Of all the punctuation marks in English, the comma is probably the one where usage varies the most. The period, the exclamation point, and the question mark are simple and straightforward by comparison; dashes and parentheses only become controversial when used to excess; semicolons are respectable and well-behaved. But every era has its own ideas about what constitutes the proper use of the comma, and every author has his or her own preferences as well.
Some writers deploy the comma with a light hand, and strictly according to textbook grammar. Others regard the comma as a tool for controlling sentence rhythm and pacing, over and above its grammatical functions, and use it accordingly.
Determining which sort of writer you are is one of the steps toward recognizing and cultivating your own prose style.
(At some point in your journey, you’ll probably find yourself developing a strong opinion pro or con on the question of the serial comma. No matter which side you choose, you will at some point end up in an argument about it with an editor whose house style calls for doing it the other way. Think of it as a rite of passage.)