While cardinals are almost always bishops,
they don't have to be so while you've spent perhaps a decade to become a bishop to then become a cardinal, the Pope can *poof*
make any priest a cardinal at any time.
It's rare like *your former job was the director of the Sistine Chapel choir* rare
but not unheard of. In fact, every stage in this whole process is subject to the sitting Pope's whim so rules without exceptions are themselves exceptions.