I haven't had this exact failure, but I've run across several bolts from big-box stores that broke long before they should have. I've adopted a policy of only getting fasteners that require strength, or those for my stock, from McMaster which still seems to require the expected quality from their suppliers. I'll occasionally buy a few fasteners for something non-critical from one of the local shops, but only for projects where strength is not even remotely an issue. These days, if in doubt, throw it out.
GsT
GsT