The cup fell, blew, or rolled into a sideways position on the rocks where it could hold some water and rain could still splash into it, but it wasn't immediately cooked by direct sunlight. There hasn't been enough rain to fill the surface of that ditch itself for years, but evidently at least one shrimp egg from the soil from a past year must have rolled into the cup or been pushed there by a bug or animal, plus some dried bits of algae and microbes, and enough dead leaf bits and soil to feed them. Then, for at least a week (based on shrimp's size), enough rain fell to keep the cup full enough to grow not only the shrimp, but enough things for it to feed on. So, now it's just in there, quietly eating microbes and filtering water in a single cup on the ground, laying clone eggs into the tiny bit of dirt at the bottom and doing whatever. It's good sized and healthy, too. This isn't even that unusual of a container; I've found them in old tires before.