"The students went to school at 10 yesterday."
Again 了 is not past tense. Chinese does not have tenses. Don't get fooled by Duolingo's notes or anyone asserting that.
了 is either an indicator of change of state, or a modal interjection about a state.
Question: When did the students go to school yesterday?
The answer provides the time only so 了 is not necessary.
Question: Were there any students in the dormitory at 10:30 yesterday?
Answer: 学生昨天十点上学 了。十点半没有学生在宿舍里。
The answer provides a change of state of the students (staying in the dorm => gone to school). 了 is required.
So it only depends on the context you want to express.
If I were to re-translate the answer back into English, it would be: The student went to school at 10am yesterday. As someone who actually speaks Chinese, but lack the fluency in recognising enough characters, I think the Chinese sentence is too general to be interpreted into the stated English statement
I think that 去学校 literally means "to go to (the) school (building)", whereas 上学 is more like "to begin studying / learning", or we might say "start school".
上 has a lot of different meanings / usages / functions, hard to map it one-to-one in English.
A useful analogy in English might be "get". As a verb it means "to obtain", but that is at best only indirectly related to what it means in phrases like "get angry" (i.e. "become angry"), or "get ready to go" (i.e. "become ready to go"). How would I explain to a non-native speaker what "become" means? I think it would be difficult. ☺️