@cyborganism they didn't. Sorry to be that guy but there's a lot of misinformation online about this photo and @PugJesus seems to have inadvertently picked up the 7 hours figure from a hoax.
In reality this was a 15 round match from the early 20th century (boxing used to be 15 not 12).
It's sometimes falsely captioned as the famous 7 hour match from the 19th century that went over 100 rounds and 7 hours.
In this case the names are right but the description of the time is wrong.
Throwing in the towel might have been an option, but as I understand it, the boxers were fighting for prize money, and the loser would get nothing. Hell of an incentive to stay in.