When they wished on the big rock, they intended to recreate what happened, however in trying to find out what happened on the night, they created the night itself. It's a bit paradoxical in time travel logic because it's self referential, i.e. they wanted to go back in time because they did go back in time.
The difference here is that they brought their past selves forward, and ended up creating the events they remembered in their own time. So, for our 4 protagonists, 4 years ago they got pulled into the future without them realizing it, and saw ghosts, which was actually themselves 4 years in the future who had summoned them there by wishing on the big rock.
To give a simpler example, say I remembered a night where I got lost and ended up in an unfamiliar place where I got punched by a randomer, and I wanted to find out what happened, and in doing so summon myself from the past. My past self will be unfamiliar with the future (with respect to him), and will be lost. He bumps into me, and I punch his face. Having just punched my past self in the face I discover that the guy who punched me 5 years ago was my future self at the time, so basically me right now.
I didn't expect the need for time travel explanation in this show if I'm honest.