How old is the vehicle and how many miles? The wheel, studs and lug nuts work as a unit as far as expansion and contraction for heat and cold. That is, when the wheel and studs get bigger when they get hot, they push harder on the lugs, which also get bigger because they are hot. When they cool, everything contracts the same way and the lugs stay tight. If the studs lose their temper over time and maybe a traumatic heat event like braking seven miles down a steep mountain road, they can become less elastic. Meaning they expand when they are hot, but don't contract so much when cool, so the lugs work loose. I've never seen it happen, but in the Marine Corps motor pool 2 1/2 and 5 ton truck preventative maintenance called for the studs to be changed after a lot of miles for that reason. I have seen the studs that hold a Harley cylinder and head to the case lose their elasticity and the bike will continually blow head gaskets until the studs are replaced.
Maybe they detected the lugs are loose when you bring it in. The first time they tried to correct with new lugs, but if they are still coming loose you may need new studs. Since it was a different shop, maybe they were unaware the first shop tried to correct with new lugs.