Sifting was originally intended to separate out things like seeds, husks, bugs etc.
Practices have come a long way since then, and the flour brought from your local supermarket is now pretty refined. However, many of us still sift flour when using it in our baking.