Developing a work ethic, or learning/doing things you aren't interested in (prelim topics)
In this case, the best way to motivate yourself to study this uninteresting material is to try to become interested in it. It's important not to specialize too early, and as a third-year undergrad, you should only now be in the process of deciding a broad subfield of mathematics to specialize in (usually Algebra, Analysis, Geometry/Topology, Applied Math, or some combination of the above). Given that you're interested in becoming an algebraist, it's simply too early in the game to be crossing specific sub-fields of algebra off your list. Especially not Galois Theory, the basics of which you will very likely be expected to know if you take graduate courses in algebraic geometry, number theory, or the like. And even if you don't directly use this material in the future, it's a chance to develop mathematical maturity and intuition. (I'm glad to have been exposed to Galois Theory as an undergraduate, and I'm an analyst!)

As for this particular class, it sounds like it's simply going too fast for you. Which there's no shame in; I certainly had the same experience when taking graduate classes as an undergrad. If you revisit this material in a few years, you may be surprised to find yourself enjoying it. In which case you'll be thankful for anything you learned the first time around, even if it didn't fully sink in.

Basically, you should motivate yourself by keeping in mind that the effort you put into this class will benefit you in ways that aren't apparent right now.