Not having an accessible mechanical latch in the front of the glovebox hatch means it’s now a single smooth surface. That’s way cheaper to injection mould than something with a hole in it.
Also, the mechanical latch mechanism needs to be strong enough to withstand hard use over many years. AND it needs to be made in a shape and finish that fits the design of the interior. AND it needs to feel good in the hand. AND it might need a lock in it, either due to expectation or regulation.
Suddenly a simple little solenoid and metre of thin gauge wire starts looking pretty cheap.