People can and do replace iPhone batteries, but it's usually taken as a sign that you had the phone long enough to morally justify getting an update. The old phone with dead battery is very often sold and the battery gets replaced - Apple sells refurbished phones too.