So sorry this happened to you. Please believe me when I say that there's probably nothing you could have done. And actually, giving birth in a grassy pasture is a great way for a foal to come into the world. It's usually cleaner than a stall with less opportunity for the umbilical cord to become infected.
A friend of mine, who's a breeder, has lost foals over the years. They were usually premature. I actually helped her with a 2-3 week premature Friesian, and I wouldn't wish that experience on anyone. There's such a small chance of survival in those cases, and this little guy did have to be put down in the end.
My2Geldings is right....nature often does work in mysterious ways, but they usually work out for the best.