The 2-3-2 format of the NBA Finals makes home-court a huge advantage — in order to win the series, the team without home-court advantage has to either win three games in a row or two games on the road over the course of a seven-game series.

In this year’s NBA Finals, the Heat have home-court advantage, and the team hasn’t lost at home throughout the playoffs, giving them a massive edge over the Mavericks. How did they get home-court advantage? A crazy final game of the regular season that saw Eddie House pour in a game-high 35 points on 7-13 shooting from beyond the arc as LeBron James, Dwyane Wade, and Chris Bosh watched from the bench. The AP’s Tim Reynolds has the story:

The story goes like this: On the final night of the regular season, the Miami Heat were playing against theToronto Raptors—and had an eye on the Dallas Mavericks. The Heat were already locked into the No. 2 seed in the Eastern Conference, but the game was far from meaningless in the sense that by winning, Miami would finish with the NBA’s third-best record.

So?

Miami finished with 58 wins. Dallas finished with 57. Had the teams ended tied, Game 1 of the finals would be in Dallas, since the Mavericks swept the Heat in the regular season. Instead, the Heat hold home-court advantage going into the title series—hardly a minor deal considering Miami is the only team still unbeaten at home in this year’s playoffs.