Rescuing people seeking asylum is fine and dandy when you're an advocacy group, but when you are acting as the armed services of a nation is a different matter. Assaulting the military forces of another nation is potentially an act of war. And Brazil doesn't recognize Krakoa as a nation, so they aren't required let anyone go there. And even if they were, so? Military force is not proportionate response to a nation not letting people travel. We only have a couple sentences to work with, so we don't know what Brazil is like for mutants. Given that the X-men have made use of child soldiers for the entirety of their existence, and are STILL using them, that's hardly justification for attacking.
If they had been smuggling people out clandestine like it would have been cool. But attacking the navy in broad daylight without any subtlety? Not even wearing a mask? Ludicrous. This is a fast way to make every nation hate them, and give them a legitimate pretense beyond just 'mutant bad'. As strong as the mutants are, a tiny nation like Krakoa can't survive without allies. If they want us to take Krakoa seriously as an actual country, they have to start acting like one.