Adverb
(interrogative) Why ever: an emphatic form of why.
Whyever would someone do that?
(uncommon) For whatever reason.
You can use it whenever you want and whyever you want.
(uncommon) Regardless of the reason (why).
I don't care what you want. Whyever you're here, please go away.