Yes, the cop customer should have been more careful but legally, the shop is at fault. They shouldn't be putting loaded guns out on display or handing a loaded gun to a customer outside of the shooting range.
It seems unlikely that the shop would accept a loaded gun as a trade-in or sale. The shop personnel usually examine a gun fully before making an offer. They need to know its condition before placing a value on it.
It's possible that it was taken to the range for a "test ride," and then returned to the case without checking it, maybe during a busy period. Still, a wrong action by the shop.
Even though the cop should know better, the ultimate responsibility is always on the shop personnel. The person behind the counter should never assume the customer knows the proper way to check or handle a weapon. In that sense, they should treat each customer like a gun newbie.