I'm currently using a flyaway hairstyle right now and noticed that most but not all Hats change that hairstyle to fit under the Hat, but the Beanie and Floppy Beanie do not and thus look pretty silly just layered in front of my hair. I don't have access to the Hat you have there so I can't try it out but my guess is there's code in the game for alternate versions of all bigger hairstyles when wearing a Hat, which would necessarily be smooshed down by the Hat to make it look decent. But the Beanies and your Hat aren't triggering this code because of programming error or bug.
Hats that don't alter hair, like the animal ears or simple hair clips don't need to change the hairstyle and don't get flagged for this hair shape change.