Yep, your thought process is exactly right. The stock market is one of the rare places where people (wrongly) get excited about prices going higher and then want to buy. And then they go down, they want to sell. It’s backwards.
Their greed causes them to chase, what they feel is “easy money”. They’re chasing excitement…the thrill. And when it goes down (since they had no system to have confidence in anyway), they sell in fear/panic, because they don’t know what they’re doing.
They’re buying high, in hopes there’s a greater fool than them to buy higher, so they can sell. While that can transpire for a while, when it ends, its ugly because it was never a rational move to begin with.