Those commas are perfectly correct, and should be used, although many people forget to use them.
Grammatically, there are various ways of describing what’s going on.
One helpful set of terms is essential vs. nonessential. When the
identifier makes sense in the sentence by itself, then the name is
nonessential and you use a comma before it. Otherwise, no comma. That
explains an exception to the only-thing-in-the-world rule: when the
words “a,” “an” or “some,” or a number, come before the description or
identification of a name, use a comma.
A Bronx plumber, Stanley Ianella, bought the winning lottery ticket.
When an identifier describes a unique person or thing and is preceded
by “the” or a possessive, use a comma:
Baseball’s home run leader, Barry Bonds, will be eligible for the Hall
of Fame next year.
My son, John, is awesome. (If you have just one son.)
But withhold the comma if not unique:
My son John is awesome. (If you have more than one son.)
The artist David Hockney is a master of color.
The celebrated British artist David Hockney is a master of color.
And even:
The gay, bespectacled, celebrated British artist David Hockney is a
master of color.
(Why are there commas after “gay” and “bespectacled” but not
“celebrated”? Because “celebrated” and “British” are different sorts
of adjectives. The sentence would not work if “and” were placed
between them, or if their order were reversed.)
If nothing comes before the identification, don’t use a comma:
The defense team was led by the attorney Harold Cullen.
(Source)