Not sure if it’s a genuine question but I’ll try to answer, I think when worms detect vibration they associate it as rain, that is why they go up ground to prevent drowning.
Edit: I got curious and it turns out my assumption was false, looks like it might be because it’s easier to migrate, then there is also to avoid predator.