Most bettas will flare their gills out like that. They do it to intimidate and make themselves look bigger. They will do it to all sorts of things especially to their reflection in mirrors. I have one that will flare at his pellets before he eats them lol