This was in a box of new 2017p cents from the bank. Out of this box, it was the only one that looked like this. What caused such bad discoloration? Did this come from the mint like this?
I'm thinking it was on the end of the roll. If it was in the middle and it appeared like this, then probably @paddyman98 would be the one to rely on for your answer.
Also remember that the mint ships in the large ballistic bags/super sacks that are moved around with fork trucks. Could a bag have gotten wet, splashed, set on wet ground, sprayed with oil or other contaminants? I work with raw materials shipped in these types of bags and you would be amazed what can happen to them. The coins are rolled by an outside company. I'm guessing the bags are dumped in a hopper and then rolled. Small quantities of damaged coins can easily get mixed in and rolled. I'm not saying with certainty that's what happened to your coin, but I believe it's a plausible explanation for finding a PMD in a roll of new coins.