is it necessary to learn all these variations that go beyond the opening and by beyond the opening I mean once you get past Bb5 in this particular case?
Only you decide what is necessary, you learn what you want to learn. But we can give some general advice.
First, don't spend too much time on openings. Knowing a lot about them makes you feel like a grandmaster during the start of the game, but hardly improves your results. As a guideline, spend less than 10% of your studying time on openings.
I assume that the position after 1.e4 e5 2.Nf3 Nc6 is one you see regularly, and that you have decided you want to play the Ruy Lopez (3.Bb5) in that position. The first goal of your study should be -- why? What's so great about that move? You should be able to put into words what White is trying to achieve, and also have some idea of how Black is trying to react to those ideas with his various replies.
Then, you start playing it. The usual advice applies: play slow, serious games against opponents of your own strength or somewhat stronger. In the opening, keep the goals of the Ruy Lopez as you understand in mind, but definitely also the main principles of any opening: try to get all your pieces into play, to get your king to safety and to prevent him doing the same.
After the game, you look at it and see what happened. Let's say that black decided to strengthen e5 by playing the delayed Steinitz, 3...a6 4.Ba4 d6. You thought hard and played a game of chess. Now is the time to look up what theory says. Does the book/DVD/whatever recommend the same move you played? If not, can you figure out why theirs is better? Again, try to understand the whys behind the moves, tactical points, et cetera. Next time you play this line, you'll understand it a bit better!
If you played something that the book didn't mention, but it still seems good to you, I recommend that you keep playing it. Maybe ask a stronger player about it some time to get his opinion.
And so on, for the rest of your chess playing :-)
Bb5
is.