Hashi didn't suffer permanent damage from Madara. The dude regenerates those kinda thing and he wasn't even that beat up. He got his ass kicked later, probably in a scenario like Tobirama's or Third Raikage's, being severely outnumbered.
Random battle maybe but if so it was very powerful shinobi! Remember hashi was one of the strongest shinobi's along with madara. I wonder who took madara out as well possibly another random battle as you like to say.