Ginny Weasley did not open the Chamber of Secrets. The Chamber was originally opened by Tom Riddle (the future Lord Voldemort) during his time as a student at Hogwarts, using the basilisk to attack Muggle-borns.
In Chamber of Secrets, Ginny was possessed by the fragment of Voldemort's soul inside the diary, which forced her to reopen the Chamber and release the basilisk again. She was a victim, not the perpetrator.