Question: why did ginny try to steal the sword of gryffindor?
Answer: With the under age tracking on her she couldn't go with him, so she was doing what she could at Hogwarts. Them not knowing that Snape would get the sword to Harry, and being Dumbledore's Army, and Gryfindors were trying to get that sword to Harry at any cost.