A primitive particle; properly interrogitive what ? (including how ?, why ? and when ?); but also exclamations like what ! (including how !), or indefinitely what (including whatever, and even relatively that which); often used with prefixes in various adverbial or conjugational sneses: - how (long, oft, [-soever]), [no-] thing, what (end, good, purpose, thing), whereby (-fore, -in, -to, -with), (for) why.
752 occurrences in 658 verses in the Hebrew Old Testament.
And Joshua said, Alas, O LORD God, why have you at all brought this people over Jordan, to deliver us into the hand of the Amorites, to destroy us? would to God we had been content, and dwelled on the other side Jordan!
And Joshua said, Why have you troubled us? the LORD shall trouble you this day. And all Israel stoned him with stones, and burned them with fire, after they had stoned them with stones.