A common theme heard today is "we stole their land". Without getting into the legalities or nuances of that, at some point after stealing the land, the government decided to give some land to the Indians. What was the motivation for doing so?
Historian Richard White said the United State's reservation system grew like "Frankenstein's monster." There was no universal, all-encompassing policy that was effectively employed by the federal government. So this is a tough question to answer. Policy for the Sioux differed from the Blackfeet, the Salish, the Five "Civilized Tribes," the Navajo etc. We are talking about an incredibly diverse body of peoples. However, there are some major policy shifts we can discuss that will give you a better picture of how the modern reservation system came to be.
Let's open this story in the mid 1800s. The Homestead Act is passed in 1862, encouraging Americans to push West. The first transcontinental is finished in 1868, providing a route to transport U.S. troops and Western goods throughout the country (an interesting side note: all told the railroads would be granted lands equal to the size of Texas from the U.S. government. Much of this was arbitrarily taken from Indian). For years the U.S. government had been picking up various tribes and relocating them to Indian Territory (i.e. taking the Cherokee from Georgia to present day Oklahoma). Other, more resilient groups, managed to remain in East on lands the government called "reservations," which more or less resembled their traditional territory, albeit shrunken. But wars were fought for these lands; "benevolent gestures" by the U.S. government were few and far between. In the West, the U.S. government sent out treaty-makers to try and delineate borders between U.S. land and Native lands. For example, Isaac Stevenson went on a tour that made treaties with the Blackfeet, Yakima, and ten other tribes in the Northwest. Originally, the Blackfeet reservation encompassed the northern half of Montana and before that the tribe had raided from Saskatchewan to the banks of the Missouri. Like many Native groups, the Blackfeet saw their reservation shrunk by a series of executive orders, military defeats/massacres, smallpox, and encroaching settlers. They were finally moved onto a small reservation in the northwest corner in the state in 1888. This was the case for many Indian peoples. With the defeat of the Apache in 1886 (though some hostilities remained) the U.S. Army had succeeded in putting down all belligerent Native Americans.
The "Indian Problem" then passed from the Department of War to the Department of the Interior. The Bureau of Indians Affairs, a subset of the Department, set up agencies on the different reservations to support Native Americans. The overwhelming sentiment at the end of the 1800s was that Indians were bound "to vanish." Anthropologists rushed around the country to try and capture "traditional" Native culture in its "historical prime." This matched the ideas of the U.S. government, which passed the Dawes Act of 1887. The Dawes Act sought to undo the broken reservation system that had Native Americans living on terrible lands and dealing with corrupt agents. The Act gave sought to break down reservations into individual allotments for different Indians. These Indians hopefully would receive Christian education, be taught to farm, and become self sustaining in a matter of years. The Act was an utter failure. Most Native Americans had no desire to become farmers in the homogenous American community and their former lands were preyed upon by eager businessman and homesteaders. The Act resulted in Native peoples losing some 90 million acres of their land and keep in mind that these lands had already been shrunken earlier in the 1800s. John Collier, an Indian advocate, helped write the Meriam Report in 1928. This report illustrated the almost universal failure of the Dawes Act. Collier was made the Commissioner of the Bureau of Indian Affairs under president Roosevelt in 1933. It was there he produced the Indian Reorganization Act in 1934, or the "Indian New Deal." Now this Act was not universally accepted or acclaimed... but it does give us the basis of the modern reservation system. The Act tried to facilitate the creation of tribal self-government, aid tribes who had lost huge portions of land, and make up for serious federal mismanagement.
I think this helps answer your question. Reservations were more an attempt to protect people on the inside from those on the outside. Indians already had a place to live, but it was stolen from them. This is not just the Legacy of U.S. conquest; it is a story of broken treaties, greedy settlers, Army massacres, and terrible diseases like smallpox. This post does not go into the variety of Indian responses to this act (which are numerous and impressive), but merely tries to outline the history of U.S. policy that guided us to present-day reservations.
SOURCES
The Legacy of Conquest by Patricia Limerick
Major Problems in American Indian History by Albert L. Hurtado and Peter Iverson
Rebirth of the Blackfeet Nation, 1912-1954 Paul C. Rosier
Railroaded by Richard White
EDIT: For grammar and layout. This is my first major post so I'm trying to figure out how it should all look.
It's really hard to get an unbiased answer to this question, because a lot of the things that were done can be interpreted to suit one's preference. Laurence Hauptman touches on this in his book Iroquois in the Civil War. At this time a lot of the reservations already existed. He talks specifically about the ones in New York, which tended to be jerked around by large development companies who wanted to trick them out of the small amount of land they had left by signing deals that they would agree to be shipped off to reservations elsewhere. So at least some of the reservations were the direct result of, if not malicious intent, at least callous greed. Though this was the fault of companies, the government certainly didn't intervene. Even into the modern day the Seneca in particular have often had to reassert their territory through court cases. Most recently, they won against tenants in the city of Salamanca, NY. Due to a treaty back in the 1800s, the Seneca actually own much of the land the city is built on, and American homeowners are technically leasing their property from the Seneca Nation. They didn't like that and tried to fight it, which ended in some evictions.
Further south there were some more Iroquois groups who fell under the territory of the Confederacy early in the war. They were coerced into allowing Confederate troops free passage across their land, and the Union government used this against them after the war even though they happily took up arms on the Union side as soon as they were able. Like the companies in New York, they took advantage of the situation. They treated the Indian groups (who had fought on their side) as losers of the war and used that as an excuse to shrink reservations and relocate groups.
So while I don't know a ton about the initial formation of reservations, at least a fair amount of how they changed, shrank, and moved through the later part of the 19th century seemed to be more selfish than benevolent on the part of the non-Indian groups involved.
If you want to read more, the book is fairly cheap on Google Play. It focuses mostly on the cultural impact of the Civil War on various Iroquois groups, but this necessarily includes significant discussion of the formation and fate of reservations.
Oglala Lakota here. I'll give you a little bit of information on the formation of my reservation (current day Pine Ridge Reservation).
A little background...
Current day Black Hills National Forest had always been a sacred place to the Oceti Sakowin (Translated into Seven Council Fires, encompasses the Lakota, Dakota and Nakota AKA Sioux). It was considered sacred land. Vision Quests would be sought in the hills. The hills were also shared by neighboring tribes as well. Cheyenne mostly.
The Oceti Sakowin, consisting of many nomadic bands that hunted the roaming buffalo, would hang around the areas of the Dakota's, Nebraska, Wyoming and Montana. A treaty was signed in 1851 to grant settlers and travelers access to the West along with allocating the territories of the plains tribes.
The US Government had always been waging wars with Native tribes. To give a timeline of what was happening and where, we'll look at the Sioux Uprising of 1862. This was fought in Minnesota. After this the Natives were continually pushed Westward by US forces.
Chief Red Cloud, after fighting the US for so long, eventually signed the Fort Laramie Treaty in 1868. He was the last leader to sign the treaty and move his group onto the reservation. This treaty is the basis for current day Pine Ridge Reservation. The treaty ensured ownership of the Black Hills to the Lakota (a collection of bands from the Oceti Sakowin). It even gave room for hunting rights in Montana and into Wyoming.
Yet, not everybody so eagerly went onto 'Reserve' land. Crazy Horse (Tȟašúŋke Witkó ) was famous for keeping his people off the reservation land and fighting the encroaching United States.
General Armstrong Custer was relocated to the Dakota's after coming from both the Civil War and fighting to relocate the Cheyenne. He led an expeditionary force into the Black Hills to research all the rumors of Black Hills Gold. This was around 1874 and started an escalation of confrontations that led to the Battle of Little Big Horn (Custer's Last Stand) in June of 1876.
Over the years the Fort Laramie Treaty of 1868 had been tossed aside and the reserve land began to grow smaller and smaller. It's still growing smaller today. I still have much reading to do to find out how exactly the land was 'stolen'. But many Natives today think the US Government should uphold the original treaty.
There aren't many written documents from my tribes point of view because we had no written language at the time. We used symbols drawn on a buffalo hide as our calendars. We called them winter counts.
(The events here are documented in many books and online references. I did use Wikipedia for the dates)
EDIT: To answer the 'why' of your question: The Fort Laramie Treaty did mention that the Lakota were NOT to attack any rail road efforts. The land at the time was very hostile with roaming bands of natives and settlers.
I really enjoy reading all these answer. I only really know iroquois history so I don't know the history of other tribes but this is all fascinating. I'd like to add that yes all tribes were treated with differently. The US was quite young when it made treaties with my people, not to sound to biased but it sounds like they had the process down a little more by the time they got out west. One quick example of how we got here is after the American revolution at the treaty of Paris there was no mention of what was to happen to the British Indian allies. A man by the name of Fredrick Haldimand helped purchase a track of land in southern Ontario for the Iroquois(mainly Mohawks) who aided the British. 6 miles on either side the grand river from its source to its mouth in Lake Erie was given to the six nations. It has been dwindled down to a few square miles, but to answer your question of why did they put them on reservations. Just thought I'd chime in.