What actually gets fixed on a water heater repair call, versus a full replacement?
A repair addresses one failed component on an otherwise sound tank: a heating element, a thermostat, a pressure relief valve, or a thermal expansion tank that has failed and lost its internal pressure cushion. The rest of the unit gets tested at the same time, since a single failed part sometimes signals a second one close behind it.
A thermal expansion tank failure in particular can show up as a loud popping or banging sound from inside the unit, caused by pressure building in a closed-loop system with nowhere else to go. Replacing that one component is usually a same-visit fix rather than a sign the whole water heater needs to come out.
Age and overall condition decide where the line sits between a worthwhile repair and a unit that is better replaced outright, and the plumber gives that assessment honestly rather than defaulting to whichever job happens to be bigger.