Those dark spot could be either due to physical damage.
For instance like banana or potato, if you hit them too hard, they will "bruise". That could be one of the cause. The other cause you see dark spot in potato means it is starting to show sign of rotting. Usually potato that are about to spoil tend to have this dark spot. If you leave this potato uncooked with the dark spot for another few days, you would realize root will start growing and by then the potato is not recommended to be eaten. This happens in both normal, purple or sweet potato. So either you can choose to cut off the dark part away from the potato before eating or you can throw it away ( if you're very particular about things like that.
P.S : If you always pick potato like that, i recommend you giving suggestions to the shop where you are buying them from. Fresh potato will look like the one on the right. To be honest, some shop may buy "poorer quality of potato" at a cheaper price and pass it off as "fresh" potato, so do be careful about that too. Just my two cents, not generalizing shops that sell such potatos.