On Sunday, in a 30-24 overtime win in Tampa Bay, the Oakland Raiders were flagged for 23 penalties, which cost them an even 200 yards. That was the most penalties for one team in a single game since at least 1940 and the third-most penalty yards that any one team has racked up in a single game in that same span. The Raiders have a history of committing penalties — the franchise led the NFL in that category for four straight years in the nineties and set the single-season record with 163 back in 2011 — so adding the single-game record to that legacy is at least in character. Heck, Oakland was already leading the NFL in penalties this season even before that, um, historic performance in Week 8. But what if I told you that the same factors that are driving the Raiders’ penalties are likely driving their surprising success?

The Raiders have the second-most penalties through eight games of any team since 1940, but Oakland is also 6-2. That may not be as surprising as it appears, because committing more penalties isn’t as strongly correlated with losing as conventional wisdom suggests. I looked at all team penalties through Week 8 of each season since the NFL’s realignment in 2002, and there was only a slightly negative correlation between penalties and winning (i.e., the more penalties a team has, the lower its winning percentage). And that correlation is actually positive for the 2016 season, thanks to the Bay Area teams: Not only is Oakland an outlier, but also the 1-6 49ers have the fewest penalties in the NFL this season.

And while most coaches stress to players that they shouldn’t incur penalties, the relationship between penalties and success (as we can see from the chart) isn’t as clear as you might think. Sure, on any given play, a penalty is bad, but penalties are also associated with aggressive, physical play, and those can be very good things on the plays where penalties aren’t called.

Of Oakland’s 103 total penalties (both accepted and declined), a league-high 53 (51 percent) of them have come on offense. (On average this season, 49 percent of all penalties have come on offense, compared to 37 percent on defense and 14 percent on special teams.) Of Oakland’s offensive penalties, 18 have come from offensive holding, which is tied for first with the Patriots (who have only played seven games), and 14 have come via false start, second in the league to Washington’s 16. And Oakland’s offense has been flagged a league-high four times for unnecessary roughness, with tackle Donald Penn owning two of those infractions.

So far this season, 45 players have been flagged for at least five offensive penalties, and six of those players are Raiders: backup lineman Vadal Alexander (8), followed by Penn (7), center Rodney Hudson (6), guard Gabe Jackson (6), WR Michael Crabtree (5) and guard Kelechi Osemele (5). In total, Raiders offensive linemen have been flagged for 33 penalties, nine more than any other offensive line in the league.

That’s a lot of penalties, but what that analysis is missing is what’s happening on all the plays that don’t result in a penalty — especially if those plays include ones where the refs don’t throw a flag because they’ve already thrown so many. And Oakland’s offensive line is doing really, really well on those plays. No team has spent more 2016 salary cap dollars on its offensive line than the Raiders, and it’s paid off: Oakland has been sacked on just 2.7 percent of all pass plays this season, the lowest rate in the NFL. And Oakland’s top three running backs — Latavius Murray, DeAndre Washington, Jalen Richard — aren’t highly-regarded and weren’t drafted with premium picks, but they have rushed 156 times for 763 yards and 6 touchdowns, averaging 4.9 yards per attempt. The Oakland line is getting things done.

We don’t often think of offensive linemen as boom-bust players, but that’s what the Raiders have created under OL coach Mike Tice. Because while that unit has been responsible for an enormous share of the team’s penalties, on most other plays, it’s operating as one of the best units in football. The Raiders have talked about building a nasty, physical, aggressive offensive line — and for better or worse, that’s exactly what they’ve done.

CORRECTION (Nov. 2, 12:34 p.m.): An earlier version of the chart in this article misstated the time period of the penalties and win percentages shown in light purple. The correct time period is 2002 to 2016, not 2012 to 2016.