Speakers tend to use 'before' and 'in front of' synonymously, but they really aren't true synonyms when referring to a line up. "in front of" refers to location (i.e., Where is Sam (located in space)? In front of Max), whereas "before" refers to a sequence (i.e., Who is next in line (to be served)? Sam is next in line. Sam is before Max.
Sam might say, "Max, you can go before me (i.e., get served before me) or "Max, you can go in front of me" (i.e., take my place in line). And since the outcome of both is that Max will be served first and Sam second, it makes the usage appear synonymous.