What happens if you specialize in one genre, and it's not hip right now? How about if you publish in one genre and do pretty well for a while, but then the genre slides into unpopularity and your sales drop?
Some authors choose to switch genres.
This may or may not be a good move.
Some authors are capable of writing in more than one genre, like Stephen King. His mainstream short stories are quite different from his horror writing. (Think of The Shawshank Redemption versus The Shining. Each is a classic in its own way.)
Other writers may not be capable of such agility. And some genres require more learning time than others for a writer to become adept. Historicals require a facility and ease with historical detail that cannot be acquired overnight, which is why historical writers usually specialize in that kind of work. Mysteries must be so well-designed that they leave me in awe, and fluency with that kind of design doesn't happen for beginners.
To write really good contemporaries, a writer has to have an interest in the general issues and problems that drive our lives right now--the spirit of our time. I am not drawn to many of those contemporary issues, at least, not as a writer. I am very unlikely to ever write a contemporary novel with major characters who are celebrities or pro athletes, or teenagers in rebellion. It's just not my game, as Doc Holliday might say. Yet other writers do this very well, and I can enjoy their gifts when I read their work.
Longtime writers of contemporaries would know me as an imposter in a second if I decided to write in their genre tomorrow. :-) Why? Because I don't have the natural sense of contemporary pacing, the eye for what small details are important in contemporary life. My brain has been wired by preference and by training for historicals. Any contemporary I tried to write would be clunky. Even if I could get good at it with hard work, I think it would take me at least two or three novels to improve. And that is a genre for which I would be inundated with material, all the time, from my own contemporary life! Imagine how much harder it would be for an inexperienced writer to "come up to speed" in military thrillers, or hard science fiction, or any genre which requires in-depth research or years of previously acquired knowledge. Anyone can research, but learning how to use that research in a given genre takes practice.
Sometimes, a writer starts off in one genre and then discovers she is much more comfortable in another. That's the opposite of switching from a natural genre for you to an unnatural one.
It's also not too much of a stretch for an author to write both adult fiction and young adult fiction in the same genre. The conventions and feel of the genre don't change from one age group to the other. Usually young adult fiction just has younger characters and is less likely to have controversial content in "romance" or violence.
What do you think about writing in multiple genres? Have you tried it? Did you find you were good at more than one, or did you have a strong gift for one over the other? Have you seen famous authors try to switch genres and succeed?