Sometimes things get worse before they get better.
Overcoming a phobia requires facing your fear in one way or another, which is by definition frightening.
Lifting weights ultimately makes you stronger, but after you train, the trained muscle feels sore and weaker.
In basketball, if you have a bad shooting technique, trying to correct it feels unnatural and hurts your shooting accuracy at first.
In the process of learning anything fairly complex (such as computer programming), initial excitement often quickly gets replaced with feelings of overwhelm, self-doubt, and thoughts of giving up.
Short-term, all of these things seem like bad choices. But in the grand scheme of things, each one of them is a step forward.