In this day and age, free really is free. People can travel anywhere in the country and buy a house there, and will do whatever they please.
But in the day and age of Dwarf Fortress, free isn't free. Dwarves are subject to the whims and laws of their superiors -- they eke out a living and travel if they think they can get a better life somewhere else. Sometimes these people aren't actually wanted.
Enter the ability to turn away immigrants. By this, I don't mean a population cap, but rather an explicit instruction which you activate within the game while reviewing a new immigrant (anyone with a flashing X). Don't like the skill set of an immigrant? Move to the [p]rofile screen and hit "[D]eny immigration" (shift+d, for safety), and boom, the new immigrant is flagged for being deported.
Turning an immigrant away can be useful in those cases where you have decided you have a comfortable population but still might consider accepting a skilled (or even unskilled) immigrant here or there. For instance, I tend to find that I'm getting as many as four, five, or even six mechanics, and can put at most two mechanics to good use. The others get reassigned as farmers instead. I would rather turn away these mechanics than have to bother with reassigning them. It'd be much faster, and even though I'd have to use a Shift+D every time, it's still faster than going into their labour preferences and changing every one of them into something they're not.
There are some rules surrounding denying immigrants:
1) Turning away an immigrant creates a bad reputation, which reduces immigrants in subsequent immigrations. It also damages trade relations with your parent civilisation.
2) You require a soldier to turn away immigrants. The soldier receives a "Deny Immigration" task and approaches the immigrant. Upon reaching the immigrant, both stand adjacent to one another for a few seconds, inversely proportional to the soldier's best weapon skill -- a dabbling soldier requires about 600 frames to turn away an immigrant, while a legendary soldier requires just 10 frames. After this time has passed, the dwarf in question becomes a migrant again and leaves the fortress by the best route.
3) Immigrants who see an immigrant get turned away get strong unhappy thoughts. Immigrants whose spouses are turned away become Very Unhappy right away and stand a good chance of becoming melancholic or berserk on fairly short order if they're not also deported.
4) Nobles can mandate that all immigrants must be accepted, thereby imprisoning any soldier who attempts a Deny Immigrant task.