It’s called breadcrumbing, and it’s a method for tracking navigation flow. It tracks your method of navigation, and allows for people to work in multiple ways.
If you’re going to link externally, you would just use the direct path…
Product pages often have multiple URL paths due to factors like session IDs, tracking parameters, faceted navigation, and pagination. These variations can lead to duplicate content issues, as search engines may view each URL as a separate page with identical content. To address this, implementing canonical tags can help specify the preferred URL, consolidating ranking signals and improving SEO.
The best option is to specify a canonical URL for each product. You may need to edit the code if you are now what to edit or use pre-built solutions via Shopify App Store. Or you can rely on the search engines themselves to reserve a canonical URL for each product at their discretion.