Goldman Sachs Group Inc.’s mortgage traders, under the spotlight because of the U.S. government’s fraud lawsuit against the securities firm, made markets in more than just bonds during the real-estate bubble.

They also cast bets on a White Castle hamburger-eating contest.

In December 2007, after the firm distributed multimillion-dollar bonus checks in part thanks to bets on a mortgage meltdown, about 10 Goldman mortgage traders, surrounded by dozens of cheering colleagues, wolfed down the burgers, according to attendees. Bystanders wagered cash on how many burgers the traders could eat.