They have a whole habitat suited to their type and personality, which is why there are some poke balls made for different types, If the Pokémon likes the habitat, they stay in the ball, if they don’t, they leave the ball. And legendary and mythical Pokémon are pickier than normal ones, which is why they’re harder to catch.