Humans are social creatures, and we must function within society to survive. Sublimation can unconsciously occur when people encounter urges or impulses that society has deemed unacceptable or inappropriate.
For example, homosexuality was not accepted (it was illegal, in fact) in Europe in the 15th century. Some hypothesize that Leonardo da Vinci sublimated his homosexuality into art, creating paintings that featured nude men.