washing machine releases a large amount of water when it drains, and that water has a force of its own. It pushes air ahead of it as it rushes through the pipes, and if that air doesn't have an easy way to get out, it uses any outlet it can find, including a toilet drain. This may be the dynamic in effect when your toilet surges, or your drain line may be clogged.