Magento is set up so that you can have many different ways to link to a product. It`s up to you how you`d like your page structure to work, and often having category names and product names in the URL structure will lead to higher SEO values.
However, you`re put at risk of being penalized by Google and other search engines for duplicate content if you don`t address this properly.
For example, these are all valid links to the same page in a Magento eCommerce store front:
In order to prevent Google from getting confused, and decreasing the search ranking of your site, you need to add a meta tag for these non-content pages that says to search engines, “Noindex, Nofollow.”
There are a few automated ways to do this, including some SEO plugin modules for Magento.