^^^ What Winnie said.
There was time a time it was allowed to run 3-wire feeder to a detached structure, if there were no parallel conductive paths between the structures, i.e., metal water line or gas line.
That exception is no longer allowed, but there are thousands of existing installations like that. Unless the home owner is going to open the walls or trench between buildings, and run a new 4 wire feeder, you're kind of stuck with it.
Unfortunately I run into this quite a lot. I see 3 wire feeders to attached and detached garage sub panels all the time. I don't know who was doing it like this or how it was passing inspection, but there it is.
I did a transfer switch replacement where they had not 1 but 2 sub panels with redundant N-G bonds, and they also had a N-G bond in the ATS. All in the same structure. Not much I could do about it besides remove the bond in the new ATS I installed, run an EGC to the sub panel, and call it good.