Ancient Cambodians never saw a stegasaurus - and that carving is not of a stegasaurus. It's of a pig and it has markings around it - just like in other carvings on that wall - the ones that are outside of view. That one just happens to resemble a stegasaurus, because you don't see the surrounding stuff.