
When Yellowstone was created as a park it was before Wyoming, Montana, and Idaho were states. Being a big area full of edible animals and interesting mineral resources that were suddenly all protected by the U.S. government, it needed protection. That job went to the army, who did the job in tents until they got tired of camping in fifty below, so they put some buildings up.
Then the Parks Service was created, and protecting the park became the job of Park Rangers, so the army cleared out to kill Spaniards or something. The buildings became a little tourist village called Mammoth Hot Springs. This village has watered lawns and a lack of predators, which suits the local elk population just fine. They have given up migrating, and they hang out surrounded by tourists (being yelled at by Park Rangers) an awful lot of the day.
( Plus there's the hot springs which are mind blowing. )