If it truly does nothing, why would the mechanic replace it instead of just leaving it off? Genuine question, I know nothing about this.
Do the manufacturers at least have some explanation for why it's there other than to make access more difficult?
It's also certainly about aesthetics when the car is being sold new - you open the hood and knowing nothing about cars (or modern cars) you see lots of little piece and become concerned that there's lots of things that could break. You open a car that says "$BRAND" in a $30 piece of plastic and you think, "Nice, this is a simple, reliable, easy-to-maintain vehicle!" There may be some small effect from highlighting the typical user service ports as well (windshield washer fluid, oil, brake, coolant reservoirs).