Help vs punishment

I was having a convo with my husband about this and it's so sad. We actually got into it because he was telling me that he knows a man in his neighborhood who struggled with attraction towards minors basically was a pedophile and once did something wrong (nobody knows but apparently molested his step daughter) he realized he was out of hand and sought therapy immediatly to get help and when he confided in the therapist he was sent to jail for 3 years and hasn't recieved help and so he's leaving in a few months he served his sentence and all he's learnt was to keep quit about his illness instead of getting therapy to overcome it (if that's possible I wouldn't know)  anyways I then said ya it's true I wonder if a women with ppd would confide in a dr that she has thoughts of harming her baby what would they do? It's a legit question I have because when I was like 1 week postpartum I had crazy thoughts (none were serious )  that I'm totally ashamed of I told my husband I don't feel safe being with the baby alone and he was like ok I'll stay with you but don't tell any dr or anything cuz youl have acs at your door! It's soso true thank god I'm 8 weeks in and all is ok but it's sad because there were times I could have really used someone to talk to without feeling as tho I would have acs there to snatch my child away. Why haven't they developed a way to have people with issues such as these confide in a professional and actually be helped vs be punished