If this was a one time occurrence for an old man who'd worked there for 50 years dealing with a new medical issue, then they should have given him a break here. That kind of condition is embarrassing and probably not an easy thing for him to accept, maybe he thought he could deal with it by holding it in and that'd he wouldn't end up in the position that he did. Give him the chance to figure out how to deal with his condition in a way that will let him continue to do his job (medication, depends) or just find another job for him in the building where he's always closer to a bathroom.
But if he's had this condition for a while, and knew this kind of thing could happen and he'd been peeing in various places at work before this, then I think firing him was reasonable. It's awful that he has such a condition, but it's also his responsibility to handle it in a way that doesn't involve peeing in random places at work.