Well, the fighter CAN attack with ground troops might be a better way to put it. It is up to the player what they want to assign to a battle.
For example, if you have to fight through enemy ships to do an amphibous landing, you can choose whether to have the fighters attack the enemy ships OR participate in the ground battle afterwards.