The soil in containers does need to be changed.
It is recommended that all the soil in containers used to grow tomatoes be replaced with fresh soil every year. For other vegetables, it is recommended that about one-third of the soil in containers be replaced each time you replant the container. Be sure to mix the new and old soil well, and amend the soil with fertilizer in both cases.
Soil of established fruit trees or shrubs in containers should be refreshed about every 5 years.