He wasn't unemployed, he was USC's OC.
I saw a Tweet yesterday talking about why NFL HCs are increasingly becoming guys with offensive backgrounds, and it basically said that it's about offensive continuity. Hire an offensive HC and the offensive philosophy, terminology, scheme, and playcalling will remain consistent for the hand picked QB, instead of a revolving door at OC and all new stuff from year to year.
Cards had the number one pick, Kyler Murray was available and just won the Heisman, Kingsbury had helped develop Mayfield, Webb and Mahomes. I'm not saying it was the best move, but I see the logic behind it.