Masturbation is a common practice at all ages, and among the reasons for resorting to masturbation is to relieve sexual tension and achieve sexual pleasure, but also for reasons that vary from person to person (such as avoiding pregnancy or sexually transmitted diseases).
Some also resort to masturbation to obtain a semen sample for fertility testing.