Some tanks are set up as grow outs for this specific reason.
Using an adequate tanks size for life isnt always feasible
Growing out a fish in a tank too small to support its growth in bioload is either lack of experience on behalf of the fishkeeper or total disregard for the well being of the fish. You can't actually grow a fish properly if its subjected to the odd ammonia and nitrite spikes. The inevitable outcomes are stunting, diseases and early death.
But yeah, sure it is done all the time...