I'm not sure but I think this subject has come up before. I would say that a good artist can paint anything but gets best at what they prefer to paint and paint the most of.
Marvin's short but well put statement of "Economics" I feel hits the reason artists get known for a particular genre. It is very hard to have a focused marketing plan if your portfolio has a few figure paintings, then one or 2 still lifes, then some landscapes.
If you have a lot of each of these then, OK, you in essence have 3 different but complete portfolios. But if you are starting out and need to build a portfolio of portraits then you need to focus on doing as many portraits as you can. Same goes for the artist that wants to sell landscapes. You need to produce more than just a few good pieces to convince a gallery that you can produce good landscapes with any consistency.
I feel it is personal preference that first makes an artist gravitate toward a particular subject matter. After that it is economics, both of time and the economics of the art market that causes artists to become somewhat specialized.
Marvin in one word hit the nail on the head, or is that "put the head on the nail" or "hit the nail on his thumb"?