With 12 lbs of grain and 8.5 gal of strike water, your end-of-mash/pre-boil SG should have been about 1.046,
if you got 100% conversion of starch to sugars and dextrins. Your value of 1.030 works out to a conversion efficiency of about 63%, which is quite low. If you had errors in your grain weight, strike volume, and/or pre-boil SG measurements, then these calculations will also be inaccurate. But in any case, it looks like your mash was nowhere near long enough to get complete conversion for your level of crush and mash temp (your pH was in the good range, so no issue there.) If you had dough balls in the mash, this could also lead to low conversion efficiency. Did you stir the mash well prior to lifting and draining the bag? If not, then wort stratification could have affected the pre-boil SG measurement.
End of mash target SGs can be accurately predicted just using the grain weight, weighted average grain potential, weighted average grain moisture content, and strike water volume. (If you don't have detailed potential and moisture data for the grain, just using the typical 1.037 [80%] and 4% should not cause too much error, as the most important variables are grain weight and strike water volume.) The reference uses metric units, but you can do equivalent calculations using imperial units. I have a spreadsheet that you can
access here, that does all of the related calculations, and more. To use this spreadsheet, you should download a copy as either an Excel or LibreOffice spreadsheet, and work with it locally.
Brew on