Failure is needed because without it we wouldn’t appreciate success. And we learn how to work for wath we want. Imagine if most things would be easy to get. If there would be a point where things wouldn’t go as planned and you end up failing. For the first time in your life, you may not know how to get youself back up.
J.K. Rowling said “It is impossible to live without failing at something, unless you live so cautiously that you might has well not have lived at all, in which case you have failed by default.”
So if you haven’t failed, you haven’t lived. And I bet the feeling, when you finally get success, is amazing.