Yea. Don't do that. Overfilling is really bad to both the environment and your car. When the gas pump shuts off, your tank is as good as full as you honestly need it. Any higher and you are wasting fuel and straining your fuel pump.
But. As to how much gas your tank holds. Every vehicle is different and your gas range was wrong. How do I know it was wrong? Becuase it is always wrong. It is a best guest "guestimate" based on a bunch of ENRON math.
It is impossible to actually "access" all the fuel in your tank. You just can't get it all. How much gas is left in the tank when your fuel pump is unable to "grab" it has a lot to do with tank design and orientation of your car. I have helped many people get down the road to a gas station as they were sputtering out by stopping and jumping up and down on the bumper to jostle the fuel tank and see if you could get just enough gas in the fuel lines to get the car rolling that .2 miles to the gas station.
The point. Don't sweat it. You car could well have been sitting at a slight angle or you could of had 4 gallons of fuel left in your tank. The actual gas gauge is a not very accurate either.....
TL;DR. Never trust your range gauge... it lies.. there is no cake.
HERE is why over filling is bad:
Don't Top Off Your Gas Tank! | Mid-Atlantic Air Protection
Depending on your car it is really painful to your fuel system.