Pakistan spent years supporting the Taliban when it suited their purposes and now when they claim the Taliban are harbouring terrorists that oppose Pakistan they are bombing Afghanistan.
Too many countries seem to think that their past actions will not bear future consequences or 'blowback' to use the US term that became popular after the Iraq debacle.
Even Sky News reported this inconvenient fact:
Pakistan sheltered Afghanistan's Taliban for decades
[https://news.sky.com/story/pakistan-war-latest-open-war-with-afghanistan-as-strikes-launched-across-country-13512816]
What goes around, comes around.