Because only one of them actually is. Myst IV: Revelation is the fourth entry in the Myst storyline, and always was.
URU: Ages Beyond Myst sits outside that storyline. It is set in the present day and was designed as a bridge into the Uru live-service MMO, which is a different project with different numbering. The reason the two look like they are competing for the same slot is simple scheduling: Uru shipped after Myst III but before Revelation was finished, so the release order and the story order disagree.
Count by narrative, not by date, and Revelation is unambiguously number four.