Always been led to believe that the song was written by Burns based on actual events. Burns coined many songs in order to preserve pipe tunes, at the time the playing of pipes was proscribed, this I believe was one of them.