The stated dimensions are the outside of the tank glass and don't account for the thickness of the glass itself. Manufacturers use them because bigger sounds better. I did not do the calculations myself; they're what I recall from a chart I saw years ago with actual vs. stated (gotta be honest here, I thought it was common knowledge that tanks never hold as much as they say they do, so I have no reference). I may be off and it's closer to 50 than 45, as my memory isn't that good. Still, same point.
There are a few exceptions; the 40 breeder is one. Outer dimensions will put you around 44 gallons - it makes no sense at all.