Why do doctors sometimes wait years until they give a diagnosis?

Example: My doctor recently told me that they can finally diagnose me with a type of BPD since I’m 18+. I’ve been wrongly diagnosed as someone with depression and anxiety since I was 10.

It just makes me mad they could have helped me then but decided to wait until now, when it feels too late because I actually broke down and attempted suicide.

Why didnt they just straight up told me and treated me for that? Why didnt they give me therapy for that? I could have been free from this issue by now, he said it can take years to change my ways and my thinking and feel better on my own without relying on medication. If they knew, why didn’t they do anything about it?