Now es in latin is ex, but how does joining it to garer (which is hide or park) produces perdu or lost?
As you say égarer is formed with Latin prefix ex/es - meaning "out of", and garer. If you understand what garer means ("to put aside") then it's easy to follow how the two words are related.
Garer is to put something in its proper place and "égarer" is to misplace something.
Garer comes form an old Norse word varask meaning "to beware" (être sur ses gardes). In Old French (12th century) the form guerrer meant "to defend oneself". In the 15th century garer meant "to harbour a boat" then (17th century) it took the meaning of "to pull a vehicle over" (stop a vehicle on the side of the road in order to let another vehicle go past), and it could be used for anything that one wanted to put out of the way in order to protect it, in the 19th century it took its present meaning, i.e. to park a vehicle.
Égarer in Old French was used as an adjective to describe a troubled mind and then (12th century) it started being used as "to lose one's way" and from there to "misplace something".