Rhyme or reason

A good plan or reason, a reasonable purpose or explanation (usually used in negative or interrogative or conditional sentences).

There was no rhyme or reason as to why my friend suddenly quit his job.