Throwing a pie in a person's face has been a staple of film comedy since Ben Turpin received one in Mr. Flip in 1909, and is often associated with clowns in popular culture.
Ben Turpin was the first person to have had a pie thrown in his face in 1909. Since then this has become a regular thing in comedy films. People often associate this act with clowns.