How exactly all that stupid?

Team Rocket wanted to contact their original leader so he'd gain control again.

Team Aqua and Magma thought they were helping Pokemon. They didn't mean actual harm.

You can do a crapload of stuff under a huge mountain unnoticed. It just needs to be really deep in the ground.