Lifter bars in ball mills and rod mills are used to rotate the balls and rods, facilitating the grinding and crushing of the feed material.