Thank you for your question.
Post inflammatory hyperpigmentation (PIH) occurs after an inflammatory event, leading to an increase in melanin production in the affected skin area. The more inflamed an acne breakout, the larger and darker the PIH.
That would explain why even if you did not pop the pimple, PIH can still occur as acne is an inflammatory event, which may still eventually lead to PIH.
Hope that answer your question and have a wonderful weekend. Do let me you if you have any further questions.
Best Wishes,
Vincent