Prepositions have metaphorical uses that derrive from abstract meaning, as in "to be on duty", that doesn't exactly mean the same as "the book is on the table", or as in "to be under oath", that doesn't mean exactly the same as "to be under the table".
However, if you think in abstract terms, "on duty" lies on a "time table", time being the support necessary to what you do on duty, and "under oath" implies that what you say or do is submitted to an authority "above" you.
Now if you put friendship before money, it doesn't mean that you do something before another, but that you prefer friendship to money, and that friendship comes first in the order of values, rather than in the order of time, although there is a time of comparison : the first value is compared to the second.
The verb "prefer" carries the same idea : from Latin "prae" (before, in front) and "ferre" (put, set), so you can say "I prefer friendship to money" or "I put friendship before money". It also means that you put the first value above the other.
Similarly, if you appear before a judge it means that you appear before the eyes of an authority that is above you. So you might be "in front of the judge" but is isn't the same as being "before the judge" or "before a court".
You might also say "I'm in front of a house", but it doesn't mean the same as "I stopped before a large white house". The second implies that you're under the spell of its beauty.
BEFORE is far more subjective than IN FRONT OF. That's why you can be submitted to feelings when something appear before your eyes or submitted to authority if you appear before a judge.