i think there are two major reasons that all these famous producers can rap. the first is that they spend so much time listening to rap, recording it, working on it with mcees, that they pick up some things from there. second reason is that a lot of em started out rapping. nowadays, with some producers getting bigger names, there are more kids who start out just wanting to make beats, but back in the day, almost everyone wanted to rap, because there werent many famous or well known producers.
to me, its not that important, its more of a function of spending time producing. i would always focus on getting the best i can at one or the other, rather than trying to learn to do both. specialize.
im a garbage mc though, so im kinda biased.
there are also a lot of producers who try to get in the booth in the end and arent that good, even if they are great producers. like alchemist for example. they see so many people rapping they feel like they want to get into that side of the game too.