Just like cars, things change between model years. Sometimes they spec up the bikes and sometimes they spec them down even with the same model number. And sometimes its for profit margin reasons or to improve sales next to competitors.
In this case, for example, the main differences between the same bike in 2 model years are a slight geometry change, a different brand of brakes and a slightly bigger tire.
As for different model numbers, they have different quality levels of components. Think of it as buying a car, with the base package, or the mid level package or top level package. Typically, you'll get some nicer components (better fork/brakes/drivetrain/wheels), though in some brands, there are more pronounced differences than different components bolted on to the same frame (e.g. the low end ones are made of aluminum and the high end ones are made of carbon fiber).
Now, for the real way to select a bike: the model year doesn't really matter -- a lot of people have 30 year old bikes which ride great. A used bike is a good starting point for people so they get to know what they actually want before dropping a large sum of money. And the best way to decide on a bike is to ride it to make sure it fits well and you like it. You can talk to the bike shop to see what models would fit for your intended goals.