This was one of the really bizarre things I've ever seen in tournament golf. The MOST bizarre part of it was listening to the Euro Tour official explain afterwards why they did NOT penalize Rahm, despite saying that Rahm had clearly replaced the ball in a different spot; it's just an automatic penalty, no question about it. For the life of me, I can't understand that; intent doesn't matter, the size of the change doesn't matter, advantage gained (or not) doesn't matter. Either the ball goes back in the same place, or it doesn't, and this didn't. I would think the other players would be furious.
As to Rahm himself, I have a REALLY hard time believing that he just forgot that he had marked the ball to the side. How many times does that situation come up? Even in casual play, it is such an unusual way to mark your ball that I'm afraid somebody will see me put the ball back in the wrong place. This was pretty egregious, and VERY hard to understand.
I don't mean for any of this to sound holier than thou; we've ALL done what Lexi Thompson did when the is an old ball mark or an aeration hole, or the like. We have NOT all done what Rahm did, though, whether he gained advantage or not.