Well, your back remembers it too.
You may have heard of the term "muscle memory" in the past. It's a loose term defining the body's ability to remember past motor patterns, often triggered subconsciously as soon as the right environment presents itself. For instance, someone may not have ridden bike in 30 years, but as soon as they feel the seat, pedals, and handlebar, all the balance and coordination comes rushing back to them and off they go.
Now imagine if, instead of that feeling of the bike seat and pedals, the trigger you felt was bending forward. And instead of the ability to ride the bike, the signal that your brain digs out of storage is pain.
This is one of our BIG contributors to chronic pain. Very often, our past experiences of what caused pain in the first place, no matter how long ago, can amplify pain we feel in the future as a conditioned response. In the same way that Pavlov trained dogs to salivate at the ring of a bell, regardless of food actually being present, the nervous system can be trained to pump out pain signals, regardless of an appropriate trigger.
This concept is closely integrated with the one showing expectations of pain causing increased pain. In this example, your back is conditioned to have an exaggerated guarding response to bending forward. What's more, this bad habit is further encouraged by the fact that you've explicitly been avoiding flexion, essentially confirming your nervous system's irrational fear of the movement.
Hopefully, this helps to create an understanding of why pain can be persistent long after tissue has healed and appropriate triggers are no longer present. There are definitely subconscious and conscious factors at play here. (Along with the physical side, which, I'm not ignoring. Don't worry!)
With this being said, this is the reason why a lot of the rehab that I do with clients doesn't necessarily involve strengthening, but instead reteaching and reassuring them of movement and ranges that has been, inappropriately, acting as triggers. This goes for active and nonactive populations as well; it's incredible how many gym rats I need to teach how to round their backs again.