In Bootstrap 4 you don't have to specify the number of columns in a row with the class names, you can just keep adding .col divs to squeeze in more columns. But you can still declare the number of columns a div should occupy (out of 12 available columns in a row).
You can see the difference in this simple codepen demo: hidden link
Note that the second row wrongly tries to add four columns when the .col-sm-4 class dictates that only 3 are available.
When you choose Bootstrap columns as the output format of a View you *are* specifying the number of columns, and because the markup is generated mechanically by the iterations of the Loop it is somewhat rigid and it makes sense for the class names to include the number of columns, but it will actually achieve the same result if you edit it to remove them (because Views will be adding the correct number of columns to each row in any case).