As has been mentioned it is an ancient practice to calm babies down, thinking that it somehow mimics the intrauterine environment.
Remember that some babies love swaddling , but some do not. Let your baby tell what they like. If swaddling, do it safely with no risk of smothering. I do not believe that there is an age limit as to a baby being too old to swaddle.