Like most cities in California, Bakersfield has issues with its air quality. The government is aware and working on improving this.
Factors like increased traffic, oil production, winemaking, and the dairy industry all contribute to the bad air in the region. Also the dust from dry soil can further agitate those experiencing issues.
It is advised to ensure you hotel uses air conditioning and- if you suffer from respiratory issues- that you carry the necessary equipment to relieve poor breathing (eg. an inhaler) should you need it.