I am not sure about this, but I believe it's about the theme of each opening. In the Ruy Lopez Exchange, the position is of an open character. Development and active pieces are important and taking with the d pawn helps. In the Rossolimo, Black plays on the queenside, taking with the b pawn opens the b file for the rook.
Take with which pawn?
Ruy Lopez (Or Spaans in Dutch) is a play with Bishops. So when retake the Bishop, you must take it with the B-pawn. So you can block the center for white's dark bishop. Okay... you block the center for your own bishops as well, but I am always tought, that you must take towards the middle of the board because of the reason I told above.

I'd take with the queen pawn because then I could boost my queen up on the next move to avenge my suddenly unprotected center pawn if white snatches it. I don't recall at the moment how you'd accomplish that with the knight pawn recapture.

Ok people, it has nothing to do with "capturing towards the centre" or "opening lines for my bishops and his bishops and blocking my bishops while his bishops and my bishops are bishops" (actually the move ...dxc6 is partly for open bishop lines)
...dxc6 is forced as ...bxc6 loses a pawn to Nxe5. Black can regain the pawn after ...dxe5 by ...Qd4!, regaining the pawn favourably.
In various sicilian variations, black aims to somewhat lock down the centre and play on the flanks. By somewhat lock down the centre I mean that at any time, if useful, he can open up the centre to his advantage, or he can open up teh centre to give both sides winning chances. The move ...bxc6 is played as this practically holds white's centre still, prevents d2-d4 via strategical reasons, and opens up the bfile for strong threats after a fianchetto of the f8 bishop.
In the Ruy Lopez exchange, after Bxc6, Black takes the Bishop with the d pawn. In the Rossolimo variation of the Sicilian, the Bishop is taken with the b pawn. Why is that?