I do not know the origin of the seemingly fair concept of first come, first served. I know we learn it at a very young age. Whoever is first in line gets to go first. Wait your turn. It seems inherently fair. But in the real world, it doesn't always happen.
Take @nicksimard 's observation about grocery check-out lines. When a new register opens, who usually gets that next spot? It should be the next person in line, but often it's someone at the end of the line who quickly cuts over.
What about getting served drinks at a bar? One of the key factors is the gender of the bartender and the gender of the patron. It's sexist but reality.
What about big purchases? Suppose you go to a car dealership, test drive a car, and give a verbal commitment to buy but you need time to get a down payment or get affairs in order. Suppose someone comes along in the meantime and wants to buy that same car. What should the salesman do? Are there rules around this or is it more about ethical behavior? In my opinion, the salesman should reach out to the first person before selling the car to the second person. I'm sure many times this does not happen.
A final example comes from real estate. A friend of mine and his wife found a house that was just put on the market. They did a tour of the house, and that day they submitted an offer for the full purchase price. The buyer agreed to the price and countered with two items as part of the agreement. My friend gave a verbal agreement and had until the next day to sign the papers. Within three hours after receiving the agreement the buyer signed, he was informed by his realtor that someone else submitted an offer above the asking price and the seller accepted that offer instead. So the house was under contract within 24 hours of being listed. Apparently "first come, first served" does not apply in a hot real estate market.
You either win or you learn. Life isn't always fair. I believe that as long as you operate with principles and behave ethically, the coin tosses will turn up in your favor more times than not.