When importing bills in QuickBooks Online, the CSV file must contain all our mandatory fields (marked as *). See this:
Being able to specify or map classes is a great option to add to the import process. However, the import template doesn't count the class field as one of its mandatory field. As a workaround, you can look for third-party bill importing tool from our app center to be able to do what you want.