I don’t think there’s necessarily any law broken, although you never know. Target is private property. How is the law supposed to distinguish beween leaving a loaded gun in the toy aisle of Target and leaving a loaded gun on an outdoor table at a gun range? They’re both private property. The law (thankfully, as yet) doesn’t attempt to tease out the precise public risk of every single act on private property and say what the legislature, in their awesome God-like wisdom, finds is and is not permissible.
That is not to say, however, that any number of people might have a civil complaint here, depending on how things work out. But the odd nature of civil complaints is that there has to be some actual injury, you can rarely sue someone for just a risk. So…if someone got hurt with the gun, that person would probably have a civil case against Target for not preventing this dangerous thing from lying around their property, just as your visiting mother-in-law might sue you for the broken leg she sustained tumblign down the stairs after fleeing in fright from the plastic poisonous snake you left in the guest room for her to discover.
It’s probable Target would have a civil case against whoever left the gun there, particularly if it was done on purpose, the same way a homeowner would if he invited his mother-in-law to visit and in rage about a joke snake she left behind a sack of dog shit in the dishwasher. I expect Target could successfully sue that person for whatever it cost them to safely dispose of the gun, even if nothing else happens.
Since so far the Supreme Court does not say people have an unlimited right to possess weapons in public, it is likely the polity has regulated the possession in public, and would be well within its rights to revoke the right to carry a weapon in public of the owner, for being a God-damned fool, even though it happened on private property. Obviously Target could ban this person from their property, and refuse to do business with them.
The situation would be different if the gun were left in a public park or on a street, however. In that case, there are any number of laws prohibiting dangerous conduct in public spaces. The difference is that the public (i.e. the law) has a right to regulate conduct in the public space, because everyone has to use it, and the police have broad powers to decide what is, and isn’t, safe and reasonable conduct. Nobody is required to go to Target (on private property), however. You choose to do so. It’s up to you to assess the risk of doing so, and you always have the option of not going onto someone else’s property if the risks are too high or insufficiently known. Hence the law attempts to regulate what happens on private property to a much lesser extent.