That's what happens when you play both sides in a conflict - you get bit by both sides sooner or later.
You fund and train the Taliban while at the same time claiming to fight them so more cash flows in the from the U.S.
Eventually the guy with the big gun is going to get tired of your bullshit and take things into his own hands. This is why it happened, and this is why Pakistan isn't owed shit in the way of an apology.
Sure, NATO needs to apologize so Pakistan stops transporting the militants to the fuel convoys and arming them to take out the trucks. Hell, I wouldn't be surprised of Pakistani soldiers themselves are carrying out the attacks in plainclothes. But as far as for humanitarian or 'whoops, our bad' reasons, Pakistan can suck it.
"Never attribute to malice that which can be adequately explained by stupidity."
10/11 - 24, Smote on Feb 13