Why and how is it that Yoruichi can transform into a cat?
There is no definitive answer to this and any attempts at an to answer this would be speculative at most. It was never explained in neither the manga nor the anime.

From the wiki:


  ...While it is unknown how she obtained her cat transformation, she appears to prefer spending most of her time in it....