He knew he could not win and chose to spare himself the humiliating details of once-cherished teammates testifying against him, of other evidence rolled out to expose the dark side of the fairy tale.
So I don't think it was unusual for Bartok to pick a revisionist rendition of a dark and terror-filled fairy tale as the libretto for his first and only opera, Duke Bluebeard's Castle.