The answers to this question got me thinking. Aunt Petunia probably spent her childhood with Lily and though she was bitter, was probably in close contact with her at least until she finished Hogwarts. Wouldn't she have known beforehand that they weren't allowed to use magic outside of school?
Lily actually broke the rules several times and did magic outside of school. As Petunia screams in Philosopher's Stone:
"Oh, she got a letter just like that and disappeared off to that – that school – and came home every holiday with her pockets full of frog-spawn, turning teacups into rats.”
JK Rowling was apparently asked about this enough that it became an FAQ on her website, in which she reveals that Aunt Petunia was telling the truth. Lily really did do magic outside of school.
Aunt Petunia is exaggerating a little; you have to allow for her state of mind when she started shrieking these things. However, just like her son, Lily was not averse to testing the limits of the Statute of Secrecy, so you can safely assume she will have had a few warning letters – nothing too serious, though.
Petunia may have seen the magic as a child, but not realized what the letters Lily was receiving were saying.
She definitely knew once, but seems to have forgotten.
We know from memories we see in the final book that Petunia overheard a conversation in which Lily was told about the Statute of Secrecy, and how she couldn’t do magic outside school:
“…and the Ministry can punish you if you do magic outside school, you get letters.”
“But I have done magic outside school!”
“We’re all right. We haven’t got wands yet. They let you off when you’re a kid and you can’t help it. But once you’re eleven,” he nodded importantly, “and they start training you, then you’ve got to go careful.” […]
Then a small rustling noise behind Harry made him turn: Petunia, hiding behind a tree, had lost her footing.
— Deathly Hallows, chapter 33 (The Prince’s Tale)
So she knew about this rule at some point.
But when Hagrid arrives to take Harry to school (about twenty years later), the way Petunia describes it sounds as if Lily was doing magic outside school:
“How could you not be, my dratted sister being what she was? Oh, she got a letter just like that and disappeared off to that – that school – and came home every holiday with her pockets full of frog-spawn, turning teacups into rats.”
— Philosopher’s Stone, chapter 4 (The Keeper of the Keys)
When Harry receives his letter from the Ministry, it also sounds as if all the Dursleys, including Petunia, are concerned that Harry would use magic outside school:
“You didn’t tell us you weren’t allowed to use magic outside school,” said Uncle Vernon, a mad gleam dancing in his eyes. “Forgot to mention it…. Slipped your mind, I daresay….” […]
Life at Privet Drive had reached an all-time low. Now that the Dursleys knew they weren’t going to wake up as fruit bats, he had lost his only weapon.
— Chamber of Secrets, chapter 2 (Dobby’s Warning)
So it seems that she really has forgotten.
I would guess that when she married Vernon, Petunia tried to push all knowledge of the magical world to the back of her mind. It may also have helped if Vernon, paranoid as he is, kept talking about the possibility that Harry would use his magic against them.
Alternatively, given that Vernon and Petunia don’t set much store by Harry, his parents or the magical world in general, she could have convinced themselves that Harry would ignore this law without any real consequence, so legitimising the fear.
I would also like to point out that even though Harry isn't allowed to do magic outside of school, he is still capable of it. It's not like they had any way of stopping him if he tried.
But I agree more with the above answers in that she merely forgot. It never pertained to her and she did see Lily doing magic.
Side note: I would wager that small magic of no consequence would have been overlooked/ not even reported to the ministry. Hermione, when she first met the boys on the train says something along the lines of
Of course, I've only tried a few simple spells myself, but they've all worked for me.
(if anyone has the direct quote feel free to edit this, I don't have the books with me.) Indicating that even with a wand/ being 11 and of Hogwarts age, it's not like kids weren't casting spells. But really, who wants to expell a kid for turning tea cups into rats (and probably bad ones with them being so young)
Of course Petunia would have no way of classifying spells and as far as she was concerned, even if she remembered the rules, they weren't enforced.
Everyone seems correct here.. I would like to add that turning teacups into rats is advanced transfiguration.. Maybe Lily was of age when she did such things at home.. Petunia didn't know wizards turn of age earlier than Muggles, so she probably retained the impression that Lily did magic in vacations at home..