Why does the happy ending have to involve him hanging up the cape and cowl?
It doesn't have to, but in general, it's tricky to pull off a happy ending for Batman, since he exists because of crime, which is part of the human condition. If he's still in his 60s and fighting crime, something probably didn't quite work out somewhere.
A happy ending for Batman and/or his Bruce Wayne side does not require the sacrifice of one or the other.