This video from the USA says about itself:
Squirrel Attacks Pileated Woodpecker and Steals Its Bugs
11 August 2016
Gray Squirrel stakes out a female Pileated Woodpecker on three different days and waits until she has exposed bug infested wood with her powerful beak and then attacks – scaring off the woodpecker and then immediately begins to eat where the Pileated Woodpecker just exposed the rotting wood. It is either doing this to gain access to the tasty ant larvae under the bark or there is something about the wood such as minerals or “medicine” that the squirrel finds appealing.
Although it is not uncommon for squirrels and woodpeckers to occasionally have a tussle I have never heard of or seen this unusual behavior before. Clearly the squirrel has learned to take advantage of the Pileated Woodpecker‘s hard work – no doubt for some nefarious purpose. This may go on all the time in dense cover like this its just that I was lucky to notice it.