Jem is twelve years old at this point. He's just getting into his teenage years; this can be a difficult time of personal growth and transition to adulthood. Jem tries to adapt and assumes a more adult identity. When he talks to Scout, she notices a "maddening air of wisdom." With Jem embracing adulthood and spending more time by himself, less time with Scout, she looks forward to having Dill around for the summer. However, Dill writes and says he has to stay in Meridian, leaving Scout without any close friends who are her age. She necessarily takes Jem's personality change a bit harder because she is left alone. The reason she is so surprised at his change is because it happens so quickly.
Overnight, it seemed, Jem had acquired an alien set of values and was trying to impose them on me: several times he went so far as to tell me what to do.
Over the course of the novel, Jem matures in various ways. This maturation is gradual but does contain particularly dramatic changes such as this. This seems to be a temporary change because Jem is trying to be an adult before he actually is one.