However, in a project there is a bunch of stuff you need to do that's mainly specific to product management. Tracking the feedback, talking to users, coordination with other product teams, covering the nontechnical pieces, etc. Every stakeholder does their thing. The PM in most cases doesn't code, a legal or compliance stakeholder doesn't try to talk to users or come up with product feature roadmaps, the engineers don't create the artwork etc.
The shittiest experience is when you work on a product with a formal PM but you wonder what it even is they are doing, not engaging in shaping the details just signing off, not talking to stakeholders, etc. and you, the engineer, has to fill in. Buuut you also cannot just do whatever because the PM exists and needs to be consulted.