I think Zayn Malik's decision to One Direction was a good step for his career. Zayn Malik has maintained on several occasions that he left One Direction so that he could have time for his solo career. He opined, leaving One Direction would give him the time and the avenue to explore his creativity fully. This is quite understandable, as there is little to what he could do as a group.
Although according to the official statement he made out to people in connection to his departure from One Direction, he made it clear that he was leaving so that he could enjoy his life as a gentle 22-year old guy. He also stated that he left because he wanted to have time for his private life. However, his decision didn't shake the decision of the other four members to continue as a band, and they were able to release their 5th album.