The English phrase, “first come, first served,” is a pretty literal idiom. It’s basically an abbreviation of a larger phrase that uses the same words literally. For example, to say this in a different way, someone might say that, “those who come first will be served first.”
Replacing the above longer phrase with the phrase, “first come, first served,” often includes making the shorter idiomatic phrase into an adjective. For example, someone might say of a dinner event, “it’s first come first served.” Here the idiomatic phrase describes the event and plays the role of an adjective in speech.
The origin of this phrase is not commonly known. It’s assumed by word experts that this phrase naturally came to be used over time as an abbreviated way to talk about methods of distribution. One of the best ways to understand the phrase is to contrast it with other methods of distribution. A dinner that is not “first come, first served” is one where reservations apply. For example, a dinner or food service where individuals receive marked dishes with their orders, or are seated and served in a particular order, is not "first come, first served."
This phrase, which is used to refer to open distribution, can pertain to food or more abstract distributions. For example, a boss in a service company might say to a team of workers that assignments are, “first come, first served.” Here the idea is that those who first formally apply for assignments will get them, and that assignments are not being parceled out according to seniority, quotas, or any other type of fixed schedule.
Phrases that are similar to “first come, first served” are also used in idiomatic English to talk about order. For instance, the four word phrase “first in, last out” refers to any situation where any persons, items, or elements are marked or tagged for sequence. In these situations, the first to go in is the last to come out. This phrase is used extensively in engineering in a wide spectrum of scenarios where it’s important for objects to follow a physical protocol.