Bettas like to chill in cover - so, its likely it just felt vulnerable. And the old "fight or flight" mentality kicked in. Nowhere to run to, so it felt it had to fight. Also, some bettas are more aggressive than others when it comes to other fish in the tank.