The science behind the experiment: explained
Pepper is hydrophobic – which means water is not attracted to it and that’s why the pepper flakes don’t dissolve. But that doesn’t explain why the pepper flakes don’t sink. That’s all due to fact that water molecules like to cling together, lining up in a certain way that gives the top of the water a surface tension – which means something as light and as hydrophobic as pepper flakes will then just bob around on the top.
But, when you add your soap, it starts to break down the surface tension of water (as any good cleaner is designed to do). The water molecules still want to stick together and maintain that tension, so they move away from the soap, carrying the light pepper flakes along with them – creating the ‘scared’ pepper effect.