This may be useful https://z4-forum.com/forum/viewtopic.php?t=50000
Coincidentally when I bought my car almost 4 years ago the same piece on the drivers side was missing/broken and I've never replaced it and never had any hood trapping issues whatsoever
It’s put on because the car is built in the US. where they are super safety conscious.
It’s to stop children getting their fingers trapped in the roof as it closes.