If you do not round up the classes will not be wide enough to contain all of the data.
Suppose you want a frequency distribution with three classes for 1, 5, 6, 9, 17, 25, 29, 31. You have
If you used 10 for the class width you would have
You can see that 31 does not fit into any of the classes. Make the class width 11 and the problem goes away.