When there are similarities about the music some bands play, they are grouped into a new genre. Which is why some bands are hard to categorize - they're different from everything else there has ever been. Nevermore, for example.
Some bands do different stuff over time, for various reasons - to make money, to have different kinds of compositions, or because they have a wide range of music tastes (Metallica and Megadeth, for example, although they did it in different ways and not really at the same time - and for different reasons).
In some of these genres, you can't just stick by the main genre such as Rock or Metal - there are many different kinds of Metal, the differences between Heavy, Thrash, Death and Black Metal, for instance, are more than obvious and these can't be thrown in the same bag.
I tend to stick to some genres because if I know the traits of these genres I will know the music I like or not whenever something new comes across.