To call the world of Pokémon is "expansive" is an understatement. In a world filled with so many different creatures with so many fantastic abilities, it's no wonder every 10-year-old Trainer dreams of becoming a Pokémon Master. Despite such massive ambitions, only a select few will ever encounter a Legendary -- a Pokémon with enough raw power to take down any Pokémon League on its own. Even without the big League dreams, everyone knows "You Gotta Catch 'Em All," but is it really ethical to allow anyone to catch a Legendary, let alone a 10-year-old child?
The case for having a Legendary is actually a pretty strong one. Owning a Pokémon, whether they're friendly pets or competitive battlers, is the number one way to ensure protection. Any given wild Pokémon can cause serious harm to a person out in the world. But, with a Legendary holding tremendous power endeared to you and conscripted to your service, then nothing could touch you. Especially considering the fact that catching a Legendary in the first place means you're already pretty strong.
Pokémon are also beings with minds of their own, able to make their own decisions -- Legendaries are no different. Likewise, one can argue that Legendaries choose to be with a Trainer they deem worthy.
However, that kind of logic reduces Legendaries down to trophies, rather than the powerful beings that they are. It's completely fine for a Legendary to befriend a Trainer and form a bond. But using it as a measure of strength and a glorified piece of arm candy takes the Pokémon away from its definitely-more-important responsibilities.
Nearly every Legendary Pokémon has something they're in charge of or protect. Palkia and Dialga literally control space and time, Rayquayza defends the atmosphere, even Latios and Latias protect the powerful Soul Dew. But, even if they want to go with you, shoving that Pokémon with an overwhelming responsibility to the safety of the world inside a Pokéball and putting said Pokémon in your collector's box is the worst way to ego boost.
As for self-defense, it would be odd for a person to always need Legendary levels of protection. Legendaries are already rare and the only time one would need their power would be against some gigantic existential threat. However, most of the time those existential threats are triggered by someone else trying to catch and harness the power of another Legendary. In most cases, Legendaries are going to protect everyone and everything by default, no Trainer required. Holding a Legendary like Tapu Koko from Alola or Zacian and Zamazenta of Galar puts a unique disadvantage on their ability to protect the entire region.
One would also think that the Legendary in question could just leave the ball on their own and just go do their thing, but it would just be easier overall if they could roam the region independent of any barriers, not to mention no one knows whether Pokémon can willingly leave a PC Box, should the Legendary be stored there. A Legendary Pokémon has a duty to everyone in the region. It'd be inherently wrong to gatekeep their actions in any way let alone via PC Box or Pokéball.
Going back to 10-year-old children embarking on their Pokémon journey, it'd definitely be better if they weren't the stewards of such massive power. In Ash Ketchum's case, he's had plenty of encounters with Legendary Pokémon that worked out just fine for everyone. But not only would those experiences be a rough ride for any normal kid, Ash never actually kept any of the Legendaries he met.
And how could he? A decade-old kid is hardly the person you want in charge of some of the most powerful beings on the planet, and they're not exactly easy to battle with. When exactly is the right time to bust out Arceus, the god of all Pokémon, against a Gym Leader with a three-Pokémon team? There's also the fact that not every Legendary is friendly, so there's a possibility that one could exert its will onto the child and not the other way around.
The most ethical choice is to not catch the Legendary. Just don't open the can of worms. If the Legendary acknowledges a Trainer and chooses to respect them, that's one thing. However, these beings can create and halt natural disasters, control space and time, life and death and singlehandedly balance the ecosystem. Most would say it's a disservice to the global community and the Legendaries themselves to capture and stake claim to them.