Dear teachers,

Please help me with the following dialogue.

A: It's still not fixed?

B: No, and of course it had to break down during the hottest week of the year.

A: Well, if it's not fixed by tomorrow, I'm not wearing a coat and tie in the office.

What does the speaker B try to say? I am not sure "had to break down" denote here. Please help. Many thanks!!

The line is spoken out of a sense of negative coincidence, or irony:

"It had to happen", in this context, is like saying--

Of course, wouldn't you just know it-- of all the times it [the office air conditioner?] might have broken down, chance (fate) determined it to happen just at the worst time (the hottest week of the year).