It is known that bringing two dysfunctional people together can often mean that they destabilise and bring the worst In each other. They can also bring new/different dysfunctional levels to the relationship. Very often those behaviours are seen as passion and true love and all that bullshit.
JD has been managed for years , by his ex,his staff, doctors,professionals etc. That's why he appeared to be functioning.
It's also why AH appeared to be fairly normal and functioning herself when in other relationships . A lot more than JD in fact and she never needed his high levels of "management ".
Obviously, it's not AH's fault for not having the tools,experience and stability to manage him, especially when she was struggling with her own demons and issues. In my opinion, I don't actually think he would've gone for her if she did.