Ring theory : Completely lost and overwhelmed Over the past 3( 9 sessions) weeks my professor has covered entire Part 3 - Rings from 
Gallian's Abstract Algebra which includes 

Introduction to Rings
  Motivation and Definition  Examples of Rings
  Properties of Rings
  Subrings 
Integral Domains Definition and Examples 
  Ring
Ideals 
  Factor Rings
  Prime Ideals and Maximal Ideals
   Characteristic of a Field
Ring Homomorphisms 
  Properties of Ring Homomorphisms
Polynomial Rings 
  Division Algorithm 
  Consequences of Division Algorithm
Reducibility Tests
  Irreducibility Tests 
  Unique Factorization in Z[x]
Irreducibles, 
  Primes
  Historical Discussion of Fermat’s Last Theorem 
  Unique Factorization Domains
  Euclidean Domains

￼
￼All this included 100's of definitions and proofs with what seems like has no rhyme or reason. 
For example, Ideal is just introduced with this definition  

A subring A of a ring R is called a (two-sided) ideal of R if for
  every r in R and every a in A both ra and ar are in A.

And the author goes on introducing Ideal tests, Maximal/ prime ideals in his usual definition proof example format followed by hundreds of exercises. 
Concept after concept, proof after proof without motivation or any sort background as to why we need an Ideal, how it came into being.This to me is madness.  
I got absolutely repulsed by that textbook and picked up Artin's Algebra book he introduces isomorphisms , kernels and Ideals 

The property of the kernel of a ring homomorphism-that it is closed 
  under multiplication by arbitrary elements of the ring-is abstracted 
  in the concept of an ideal. This peculiar term "ideal" is an
  abbreviation of "ideal element," which was formerly used in number
  theory. We will see in Chapter 11 how the term arose.

This to me made more sense than pulling out a definition out of thin air. 
I feel angry that I wasted a semester memorizing definitions and working out proofs based on those definitions without actual understanding of motivations, history etc. I also have a feeling that I will promptly forget all the ideas in a month or two because I didn't connect them in my head to existing concepts that I knew ( that's how we learn, right? ).
My question is 
How do I prevent this from happening to me in future?
Is math supposed be learnt like you are learning a game where you are given all the rules ( definitions) and you have to play the game according to those rules( theorems, exercises) ?
why are textbooks like Gallian's popular in math instruction?
How are you supposed to read them?
Why do professors go through proof after proof with no rhyme or reason?
￼￼
 A: 
Why do professors go through proof after proof with no rhyme or reason?

One theory is that this is an "easy" way to give a lecture (to be negative about it, a "lazy" way.) This may be true in some cases. But on the other hand, much of the instructor's education might have been this way, and maybe they even think the experience is valuable. So, they might actually be giving the students the best path they know of. Some students might even feel like that is the way they are most comfortable learning. So to be fair, such instruction may be given in good faith, and may have good points.
The fact is that really good exposition requires a really skillful teacher, and it's not easy to do. Incidentally, I found Artin a very good expositor, but I did observe that by doing this, some less dedicated readers might get bored or distracted during his exposition. 
One of my books learning abstract algebra was Martin Isaacs' Algebra. At the time I did not like it very much, but looking back on it now I think I do like its exposition. This just goes to show that reasonable exposition is not always easy to evaluate.

My question is How do I prevent this from happening to me in future?

Oh, well that's easy! Go skim through a lot of alternative books on the same topic and soak up whatever you can! Don't pretend like it's your teacher's responsibility to put text on your plate. You already applied this when you picked up Artin's book and learned something from it.

why are textbooks like Gallian's popular in math instruction?

The "like" part here makes this a loaded question, but I could just say that this book is probably considered basic, safe and affordable. It probably also depends upon the teacher's experience with texts too.

How are you supposed to read them?

This varies a lot from person to person. Personally I discovered that I learn best by having three or four texts on the same topic that I can use to cross-reference topics. Usually at least one of the authors is going to say something that makes things click. 
And most of all, this sets me up with a big supply of problems. Doing problems does a lot more than plain reading, for me. Of course you have to spend some time reading or you won't know what tools you have at hand, and you won't see the themes in the proofs.

Is math supposed be learnt like you are learning a game where you are given all the rules ( definitions) and you have to play the game according to those rules( theorems, exercises) ?

I guess ideally "no", but for some people, that's how mathematics first begins! Those who persist eventually find their own appreciation for the subject matter, and develop their ability with it. This "game" analogy certainly doesn't paint a pretty picture of pedagogy, but it's very rare to find teachers with enough ability to get the beauty of mathematics across from the very beginning. 
Luckily, it sounds like you at least know mathematics is more than a string of memorized definitions and theorems and proofs, so you, my friend, are already well ahead of many other students. The rest are in the even sadder situation of thinking "Yes, that's all mathematics is. Isn't it awful?!"
A: One could argue that it is up to you as the student to learn.
The best way to learn mathematics is by doing mathematics.
By doing exercises, good exercises, the context and power of the material should come to life.
A lot of the proofs and exercises in a ring theory course are just careful application of the definitions and theorems. 
Good luck.
