Your role is to publish papers so your PI is able to get grants, and to network, so the lab profile gets better known in the research community, and then as a more senior grad student you can help write grant applications, and you can build a track record of mentoring (e.g. master students). At the end of the day, you want to demonstrate that you can come up with projects and pursue the research up until publication in a top-tier venue, and the ultimate goal (from the point of view of hiring committees) is obtaining prestige and funding for the university.

If you plan to go to industry, your incentives are somewhat misaligned with your PI. In that case you want to pursue multiple internships and getting networked with top companies in your field, and demonstrating practical output, well-released code, demonstrated downstream value for followup projects etc.

Yes, take away all the pretense and a Ph.D. is just an apprenticeship to be a researcher.