This is a pretty normal thing to do.  A visa is the "permission slip" that the country you are visiting gives you so that you can stay in that country for a while.  Just because the US allows somebody to go to college in the US does not mean that person has any claim to live her forever.  
We were on vacation in Nicaragua.  We met some Americans who spend a lot of time there.  They told us the following story: Nicaragua gives you a tourist visa for 3 months.  Every 3 months you have to leave the country and then get another visa.  The government does occasional sweeps of where gringos hang out, places like San Juan del Sur.  (Think: House Hunters International on TV) There is a fine for overstaying your visa and it goes up exponentially and is really high if you are months too long in the country.  If they catch you overstaying your visa, you had better get out your credit card!  Or they put you in jail.
Is Nicaragua racist or xenophobic? Don't most countries do this?