Why are proteins O-glycosylated?

Why are proteins O-glycosylated?