When Mikey brings the jewels off the ship, he hasn't just laid claim to a few pretty rocks. Under US and international maritime salvage law, the rights to a salvage vessel and its contents go to the person or persons who first successfully brings something off the vessel in question. Since Mikey was that person for Willy's ship, his is the ship and everything that's in it!
The traps in the cave still functioning after so many centuries. If you think about it, a lot of those traps should have been instantly lethal but the kids manage to escape them by the skin on their teeth. So the Goonies have the ravages of time to thank for not being horrifically killed when they set them off.