To add to Mr. Blaine's and Blackjack's great responses, the grades for USA fasteners are specified in Society of Automotive Engineers (SAE) Specification J429 and the grades for metric fasteners are specified in SAE J1199. Those specifications are copyrighted, and SAE is protective of that copyright. As such, my price as a long-time member is about $87 for each one (I get a whopping 10% discount for having ponied up dues, which are over $100 per year currently, for almost 40 years!)
I left the automotive engineering world in 2007, so I no longer have access through an employer to those standards. I'm going off very old memories, but I don't believe that the mechanical properties in those standards covered shear strength (in psi). They only cover tensile properties (proof strength, yield strength, tensile strength, elongation). That said, for ferrous steels, most shear strengths are in the 50-60% of tensile strength range. In other words, shear and tensile strengths are roughly proportional. The J429 spec for the tensile strength of Grade 5 and Grade 8 bolts is 120,000 psi and 150,000 psi, respectively. So, a Grade 8 bolt is nominally 25% stronger than a Grade 5 bolt in both shear and tensile.
Additionally, the way to analyze the "deformation before failure" aspect is to look at what percent of tensile strength the yield strength is. The closer to 100%, the more brittle it is (glass is effectively 100%). For Grade 5, that percentage is about 77% and for Grade 8 it's about 87%. That's a significant difference, but not so much that Grade 5 should always be chosen. We don't inspect our rigs often enough for deformation to be a factor. Deformation is usually a factor when tensile strength isn't and the joint is highly visible. In this case, tensile strength is more important.