There is no such thing as bad air.
Try and visualize aerodynamics as if they were hydrodynamics and consider air to behave like water.
Currents and up and down drafts can certainly be caused by wind over terrain. Just visualize water flowing.
Another ship ( airplane) will leave disturbed air behind.
I'm suspecting you may just have hit a strong thermal.
Everytiing has a cause and effect.
Nothing comes out of nowhere being just 'bad air'.
It's ok. Don't feel bad.
But do still talk to your instructor about it.
This is why you're a student pilot.
You're learning.