The poor grading covered the issue up. I don't think on purpose...
No, that was done completely on purpose, to cover up the deficient form / slab pour.
What I don't get is how the building was put on it before inspection. Or the dirt graded right up to it, before inspection.
Pulling forms off same day is common. After several hours the concrete isnt going anywhere.
Of greater interest to me was the time interval between the pour and the building going up on it? Did they wait all all for the concrete to cure / strengthen significantly?
I can think of an easy fix, costly to your contractor, but don't know if your locale will pass the inspection. Re-excavate the sides of the foundation, expose all that garbage overhang, drill and dowel - with epoxy - all over the sides of that first pour and re-form to the outer top edge of the existing slab and pour more concrete to fully support the outermost dimensions of your slab.
But your inspector probably won't approve it. And it may even require total replacement to pass.
Everybody failed. You, your prime, your foundation sub. It's a complete shitshow. And it is probably going to take a long time and a court and a lot more money out of your pocket to remedy.
Your foundation guy dug the trench wrong, improperly formed outside that perimeter trench, then shorted the thickness of the slab, either not enough concrete so he could pocket a ~$1000, or wound up way short on the calculated volume due to his terrible prep. I'd be surprised if the garage slab is even sloped the way it ought to be. No concrete professional would form above the top of the slab, the form is part of the screeding process. Unless there were some extenuating design circumstances and your garage is a simple thing that has none.
And then after it was done poorly - and there is no way your general / prime could have missed that it was wrong - the dirt was shoved up against it trying to hide it. Lawsuits for everybody, if your prime and inspector cannot come to an agree on an acceptable fix AND your prime eats the cost of that fix.