It is possible that the mechanic did disconnect the battery ground before working on it, and when replacing it got distracted and forgot to tighten it up.
I have found wrenches under the hood of my car. Once after an oil change I noticed a little leak under the car and found a loose drain plug with the wrench socket still on it.