The "class" attribute is allowed on some HTML elements in the default Folwell CKEditor on Drupal 8, but not on others. It is enabled on elements such as p, div, a, and ul; but it is not available on h2-h5 and table by default.
If there is reasoning behind this differentiation, I'd be curious to understand.