They both had their own issues.They were on and off so much it probably wasn't healthy. Not to mention both are still young.
They broke up the last time because Selena's mom didn't like Justin.
I personally think he married Hailey Baldwin as a rebound to get over her and make Selena jealous.
As much as they probably are a cute couple i think they have a toxic relationship it's probably for the best.Maybe when they both are older in 10-20 years and they are single they may be more mature to work out.