Birth tourism is a consequence of jus soli, also called birthright citizenship. Historically there were two opposite conceptions of "nation", leading to two opposite ideas of citizenship:
- Jus sanguinis ("right by blood"): the nation is made of an ethnically homogeneous group of people who inherit citizenship from their ancestors. This conception assumes some form of "natural right" of the people who were there in the first place.
- Jus soli ("right by place"): the nation is made of the people who live in the country for a sufficiently long time. This conception relates to the idea that nationality is a more cultural concept, people can discover and adhere to the values of the nation independently from their origins.
I would assume that the South and North America countries adopted jus soli because in principle the only people who could claim the land from their ancestors are Native Americans, so that would exclude the vast majority of the current population.
in most of Europe and Asia, you inherit your citizenship from your parents
This is a bit misleading because the three biggest countries in Europe (Germany, France and UK) also apply jus soli. However:
In an effort to discourage birth tourism, Australia, France, Germany, Ireland, New Zealand, South Africa, and the United Kingdom have modified their citizenship laws at different times, mostly by granting citizenship by birth only if at least one parent is a citizen of the country or a legal permanent resident who has lived in the country for several years.