The implication seems to be that not knowing about magic isn't enough, you have to be consciously repressing your magic, forcing it back inside until it finally erupts.
‘It’s a manifestation of Dark magic,’ explains Yates. ‘It’s really a wonderful idea that Jo came up with. When a young child is prohibited from developing their magic in a healthy, organic way, then this dark energy can develop, and the dark energy can suddenly get out of control and wreak havoc.’
Harry, by comparison isn't especially trying not to do magic. Rather than repressing it, it just occasionally bubbles out of him
“So Harry had been brought up by his dead mother’s sister and her husband. He had spent ten years with the Dursleys, never understanding why he kept making odd things happen without meaning to, believing the Dursleys’ story that he had got his scar in the car crash which had killed his parents.
...
And then, exactly a year ago, Hogwarts had written to Harry, and the whole story had come out.”
Harry Potter and the Chamber of Secrets, Chapter 1 (The Worst Birthday)
In his later year, had he remained with a vehemently anti-magical family like the Dursleys (rather than going to Hogwarts), there's a distinct possibility that he might have gone on to become an Obscurial, although that particular affliction only seems to affect younger children.