Most likely the path-finding is trying to avoid the forest squares even though the roads make them the same movement cost.
The red path goes through more forest than the green path. There is no logic in the pathing AI's decision.
Strategic pathfinding is sometimes downright bonkers. I've seen units leave a city, move a few squares, and then route back through that same city. They could have just left the city there! Sometimes, if I've got a unit stationed in a city, and I tell him to exit the city to an adjacent tile that I've selected, he will leave the city somewhere else and walk outside to get there.
The pathing AI also prefers diagonal paths to straight ones. I understand that they're, from the game perspective, the same distance, but those diagonal paths have so often put my Pioneers next to a monster that will kill it, when it could have just gone straight and been fine.
I've been wanting to report problems with the pathing AI for a while, I've just been too lazy to do it properly.