"Why" asks the reason for something.
Why were you late? (There was an accident on the highway and it caused a delay.)
Why don't you like her? (She started an affair with a friend's husband, knowing he was married.)
Why do you think you are a good candidate for this job? (I have four years of similar experience...)