Because it was on Malian soil against Malian military assets that happened to be housing Wagner assets and personnel. You’d think if Ukraine wanted to attack Russia it wouldn’t do so in Mali but instead shore up its failing front line.
We are forced to conclude that Ukraine is spending resources to attack Mali for the same reason Russia is in Mali - because the USA has an interest there. Russia is trying to disrupt that interest and Ukraine is trying to support that interest like the puppet they are.