Shaking the containers ensures that there is no air trapped in the ingredients, helping to achieve the correct measurement and accuracy.