"It Will Only Grow the Size of its Tank": This statement is a lie. Do not believe it. I don't care who tells it to you, but it is a lie. Most people who say it aren't saying it as a lie, but are misinformed about proper husbandry and diet.
I hear this a lot with fish and reptiles. "Oh, just put the oscar in a 10 gallon aquarium and he won't get big." Or, "You can keep an iguana in a 55 gallon aquarium just fine because they won't grow to big for the tank you keep them in." When I worked at Petsmart, customers would ask me if this were true. I would tell them no.
The fact is the amount an animal will grow is not controlled by the size of its environment. It is controlled by genetics and the nutrients and such available in the environment, not the size of the environment. The stress of being in a small enclosure WILL limit an animal's growing potential, but this is not something you really want. The animal will be stressed and unhappy. It will probably live a shorter life.
With fish, the water quality also comes into play. If you keep a goldfish in a bowl with no filtration, the water will be nasty. Goldfish produce a lot of waste. Even with daily water changes, the water will have some ammonia and nitrates in it almost all the time. This is unhealthy for the fish and stresses the fish, making it slow non-essential body processes. However, I'll point out that a goldfish in a bowl that has daily water changes has a better chance of living a longer life and getting bigger.
Fish also secrete growth hormone inhibitors. In a small tank, these inhibitors build up faster and the fish's body production of growth hormone is inhibited and growth slows or stop. In a larger environment, the fish isn't exposed to the growth hormone inhibitors as much as it is in a small environment.
There are several reasons that a fish might stop growing that would cause people to blame it on the size of the aquarium. The first is the growth hormone inhibitors that I mentioned. The second is underfeeding. The people who tend to think they can keep big fish in a small aquarium to keep the size down are usually new fishkeepers who haven't done enough research. They also tend to underfeed their fish, leaving the fish malnourished. The third reason is the water quality, which I alluded to with the goldfish in the bowl. Ammonia and nitrates will build up; both are poisonous to fish. There are several other things that come into play when a fish is growing.
As for reptiles, it really comes down to husbandry. This includes not only the enclosure, but also the diet and the environment they are kept in. Diet is a really big part of what determines a reptile's growth, as it does for any animal. Given only enough food to survive, but not grow and thrive, growth will slow a lot. However, given enough food to thrive, the reptile will continue to grow even in a small enclosure. Like with fish, people who believe that they can control an animal's size by giving it a small home are often inexperienced and uninformed or misinformed about diet and proper husbandry as well.
With any animal, growth potential is controlled by genetics. In humans, if you have two tall parents, their children will be tall as well, provided they are healthy throughout their growing years and don't have any disorders or anything that inhibits growth. However, if two tall parents have a child and the child is malnourished, the child will not grow to his or her full potential.
Though we humans like to think we have control over so many natural things, we don't really have as much control as we believe. Simply putting a fish or reptile in a small aquarium does not change genetics and magically make the fish or reptile grow smaller; the animal is simply not growing to its full potential and is not thriving. We can, however, somewhat shape the size through years and generations of breeding, but it will not happen just by providing a small environment.