We didn't have to go to school yesterday.

(What is the meaning of the sentence?

Is it #1 or #2?

1. We didn't go to school yesterday because it was useless.
.
2. We went to school yesterday, but it was useless. )

I don't sense any "useless" idea in that sentence.

The sentence means we didn't go to school yesterday because we weren't required to. Maybe it was a holiday, or maybe the snow was so deep no one could get through! Or something else that meant there wasn't any school yesterday.

The meaning of the sentence "We didn't have to go to school yesterday" implies that the speaker and possibly others did not go to school on the previous day.

Based on the given options, the meaning of the sentence is closer to option #1: "We didn't go to school yesterday because it was useless." This suggests that there was no requirement or obligation for the speaker and others to attend school on that particular day, possibly because it was deemed unnecessary or without any benefit.

On the other hand, option #2, "We went to school yesterday, but it was useless," does not align with the given sentence structure.