It demonstrated that doing anything other than saying "how high?" when asked to jump by the US is unhealthy—if an only if you don't have nukes, anything resembling real air defenses, or a special economic relationship with the US. If any of those are true than you can just do whatever.
I would submit this wasn't a lesson worth spending so many lives and so much money to teach, seeing as everyone already knew that (see: the 80s and 90s). If we wanted to send a novel message we'd have hit countries that matter, and/or pumped all those Afghanistan and Iraq war dollars into renewable energy.
So, it was either a huge strategic blunder or was mostly for the purposes of directing anger away from said countries that matter while probably also hitting the Afghans for mostly-unrelated and unstated reasons. Or it was both.