How can it follow parts of RE4 when the last two movies didn't even come close to what the games were about?

If you watch on the DVD there is a documentary about the first film's development. In it Anderson said he wanted to do a movie very similar to the first game using the same characters. Sony vetoed it and threatened to get a new director because they were worried it would hurt game sales if there was a movie version of the game.

To be fair, a movie version of the first game would have made the actual game's acting look amateurish and embarrassing by comparison.