Yeah, that was pretty wierd.
It was definitely a glitch. No Pokemon (Except Kanghaskan... kinda) should repeat a move that isn't multi-turn. Additionally, Meditite has no ability that would trigger this, nor Rellor.
Such a mechanic doesn't exist. You might wanna get your switch checked...