Its a priority that any developer teams sets for any kind of project.
You might be aware of the term 'DRY' i.e. Don't Repeat Yourself.
Well now question comes is, what should be DRY; HTML or CSS?
So the example you mentioned is keeping the CSS DRY and allowing class name repetition in HTML.
If you go for DRY HTML, use of Custom Tags is much better idea; as mentioned by Mev-Rael. It keeps both HTML and CSS DRY.
I think it is up to the project and its scale.
As Medium is a blogging platform, keeping CSS DRY suits better.