The crabs will move out of them if they don't like them.
There isn't a guarantee that the hermit crabs will like them.
With pet hermit crabs, the crabs are probably a lot safer and feel a lot safer than in the wild- less sunlight, less predators, more humidity, hiding places, etc.