Because "i" is actually a size_t.  Using the correct formatter for the type the datum really is is always better than casting it to some other type (which might misrepresent its value) and using a format suitable for that other type.