Boy, is the Super Bowl expensive for advertisers. This year, a 30-second spot during the biggest game in sports costs over $5 million. Judging by the numbers and research alone, that's a complete ripoff.

But a weird theory of economic behavior explains why it might be justified.

Last year, the Super Bowl raked in 111 million viewers. The next biggest event was the Oscars, way behind at 33 million. But while Super Bowl viewership steadily grew for decades — it was around 40 million in the late 1960s — it has begun to stall. The peak was 114 million in 2015, which hasn't been repeated since. Football viewership also declined 10 percent in 2017's regular season, which doesn't bode well for this Sunday.

Meanwhile, the cost of those 30-second spots is on a steady upward climb. It was negligible in the late 1960s, but by 2000 it was around $2 million. By 2015 it was $4.5 million. This year, as noted, it's over $5 million.

Many factors are driving the cost surge, but one of the biggest is arguably the economics of the digital era: The Super Bowl remains a largely social event, watched live, so viewers can't fast forward through commercials. In a world of cord-cutting, where content can be watched in myriad ways on different mediums, the Super Bowl is one of the last bastions of the traditional television advertising model.

Now, the advertising industry has a cost-benefit analysis called "cost per mille" (or CPM), a Latin word for "thousand." It's the cost of reaching 1,000 viewers.

This is where stalling Super Bowl viewership and rising ad time costs come into play: The double whammy is driving the CPM for Super Bowl ads higher and higher. As recently as 2011, it was $27 — well under the $35 CPM for a lot of big TV shows. But by 2016 the CPM for the Super Bowl was $45, putting it at the upper bound of most everything on television.

Researchers have found the ads appear to be worth it only under very specific circumstances. If you're a beer manufacturer who advertises during the game, for instance, you'll see a nice increase in sales if no competitors advertise as well. A company can also get a boost in sales if its ads run in a city with a team in the Super Bowl. But by and large, studies castdoubt on whether Super Bowl ads do much for sales.

So why do companies keep doing it?

One answer may lie in a 1973 Ph.D. thesis by Michael Spence. His idea was that employers always take a risk when they hire someone. Resumes and interviews and recommendations only mitigate the risk somewhat. Workers need some way to stand out from the pack — some extravagant and costly signal that implies desirable attributes precisely because the employer knows how costly and extravagant the signal is.

Degrees from top-tier universities are a classic example: Economists suspect that, even if your illustrious degree isn't in the field you work in, the fact that you have any degree at all signals you're more hard-working, intelligent, dedicated, etc.

Economists have since applied Spence's signaling theory to advertising. Like hiring a worker, buying a product or service can be a roll of the dice. Companies want to signal to customers that they're strong, relevant, successful, committed to quality, and already coveted by other customers. As Tim Sullivan and Ray Fishman wrote in Harvard Business Review, one pretty straightforward way to do this is to cart a bunch of money into the street and light it on fire. Only the most confident and secure companies would dare.

Enter the Super Bowl ad.

"If we don't see many companies lighting cash-fueled bonfires," Sullivan and Fishman continued, "economists have argued they do the equivalent — both more credibly and more publicly — through advertising." In other words, the pointlessness of Super Bowl ads' gargantuan extravagance is sort of the point.

There might be something to this. Even if it's hard to pin down whether the ads increase sales, research does suggest they deliver "brand lift." The advertising industry itself accepts that, beyond sales, brand awareness and goodwill should also be goals. That's often the thinking behind corporate sponsorships, product placement in movies, and presence on social media. And occasionally, ads do score a clear win: The series of ads that Errol Morris created for Miller High Life arguably revived the company's fortunes.

Ultimately, it's anyone's guess how long the Super Bowl advertising extravaganza will continue. But so long as it does, companies are likely paying up to show off their commitment, their confidence, their relevance, and the size of their, well, cash flows.