Thats because it wasn't healthy while it was in the bowl - it was stunted. A fish is not supposed to "grow to the size of it's environment," but some fish, under the right circumstances (ammonia/nitrite/nitrate levels, enough of the growth inhibiting hormone many fish produce in the water) some fish will indeed because extremely stunted. This is not the same as a fish merely adjusting to its situation - it becomes a health issue.
A common pleco in a 10g tank will mostly likely not look around and say "I'm in a 10g tank so I'll only get 3.5." Chances are, pretty soon you'd have a 10" pleco in there.