For those neurobiologically set up with OCD, many have not experienced symptoms that have interfered with their daily lives until experiencing a stressful life event. Examples of stressful events often seen to trigger symptoms include major illness, childbirth and parenting a newborn (often called "Postpartum OCD"), a trauma or an accident, etc..
With a major stressor, OCD can truly explode creating the perspective that it "came out of nowhere". However, generally speaking, the OCD was merely lying dormant, waiting for the right trigger. It can be truly jarring and disrupt life with intense suffering.
That said, there is no way to predict when OCD will be triggered for those predisposed. Some have symptoms from childhood, while others do not have the majority of disruptive symptoms until later in life.