Bakhmut has strategic importance. It's a crossroad of important highways: M03 and T0504. Losing Bakhmut will hurt Ukraine's ability to support its' troops. How much? Remains to be seen if the city truly has been captured.It is indeed not. Russia have taken a town (pre-war population ~70,000) of no particular note, nor appreciable economic or strategic benefit, that has been comprehensively levelled.
I'm not even sure why Ukraine put that much effort into holding it. There might be the PR of just holding it for the sake of spiting Russia for all the effort it was putting in. There is a belief that it now puts two significant Ukrainian cities (Kramatorsk and Sloviansk, I think) in Russian artillery range. Potentially they realised that they were bleeding the Russians much more heavily than they were suffering, and just chose to maximise the pain as Russia was stupid enough to carry on pouring resources into it - resources which could instead have been spent securing much of the rest of the frontline against a potential Ukrainian counteroffensive.