The Swiss bar that caught fire during a New Year's celebration and killed 40 people had not been inspected since 2019, officials have said.