That second url is using the view parameter in the querysting. This is telling the Shopify theme renderer to load the content for that page, and wrap it in the product.lightbox.liquid template.
I don’t know your theme but can say with good amounts of confidence that this will be for loading some content behind the scenes to drive some kind of modal or popup. How it looks is intentional as it’s never intended for a customer to view. It’s for the JavaScript in the theme to utilise (and then present in a prettier way).
In general this sort of url isn’t something that should be indexed but could be depending on how the theme is setup/coded. If you have those links somewhere on your site they’d want to be cleaned up so Google won’t default to follow and index. I didn’t see them on first glance but a good question for your developer or the theme dev.