The reason the bottom diagram is good for white is the fact that he has two minor pieces for a rook and a pawn. This is a good exchange. While the numbers in the traditional piece value are equal, the fact that two minor pieces can coordinate and hit more than the single rook can protect makes it a good trade.
The two minor pieces take a lot more time to get into ideal position than a single rook, so sometimes it is very hard to coordinate the two pieces in a practical game. Therfore, it is not all roses and rainbows to have the trade so it is still very much a game.
Don't shy away from getting this imbalance of having two minor pieces for a rook or a rook and a pawn because it is very good practice.
So I've been looking through the game explorer at this situation as I've ended up here several times. Although I'm not good with opening names yet I believe this starts as the Ruy Lopez for white.
My question is why is white's most common response here to castle instead of do d3, Nc3, or Qe2? If you follow the next few most common moves if the knight takes the center pawn ends up with white trading a rook for a bishop. To this inexperienced player that doesn't seem like a good situation to be in. I tend to do Nc3 because I am afraid of losing that rook and it puts my in a position I am more comfortable playing.
Here is what the next few most common moves results in.
Is there a reason why this is a good result for white?