Fighting fire with fire, makes sense (sometimes).
But, fighting inflation by raising prices does not make sense in the current economic quagmire.
Sure it does.
Because they are not fighting inflation. They are benefitting from inflation. "They", being various politicians and the extremely wealthy individuals who sponsor them. Any person or group in a strong power position will raise prices as much as they can and place their assets in non-currency forms. They win. Everybody else loses.
Very specifically, people who are getting paid from the government are extracting their income from people who don't get paid from the government. That is a lot of people with a vested interest in inflation as a hidden tax source for their income.
"If you rob Peter to pay Paul, you can always count on support from Paul" (Proverbial).
The "we are fighting inflation by raising rates" is a deception to keep the "little people" distracted just a little while longer, while the powers-that-be continue to pick their pockets.
If you are going to tell lies and deceive people to get something from them or harm them, it works better to tell bigger lies. That is what we are being offered as explanations for inflation. And quite a few other problems too.