Mostly the point is, to make it "look good".
There is arguably some protection for wires and pipes underneath against animals chewing on them, depending on how its implemented.
Also, on some models it may aide in airflow and cooling/thermal properties. Especially so if it is sitting around a top-mount intercooler.
(On some models like the older VW V6 engines they may also be harmful, because the heat cant dissipate well enough from the valve-covers)
While it may be technically unimportant or at least not critical, I´d still ask to get that part back. First and foremost if you ever want to sell the car, potential buyers can get a bad impression if there are parts missing. This can affect resale value. Second, any mechanic should return a car in the same good state he got it in, unless otherwise agreed.