The order that verb phrases occur in a sentence is of only minor value in determining the order in which the events they described occurred.
In your first example, the main clause is "the train had already left". That is in the past perfect, or past-in-the-past, meaning it happened earlier than the overall time of the sentence. The prepositional phrase "when I reached the platform" indicates the overall time of the sentence - the point in time at which the speaker reached the platform. In addition, the adverb already indicates that the action of the principal verb was already complete at the time of the prepositional phrase. The sequence of the events is extremely clear - the one mentioned first occurred second.
However, you could swap the two over and the order of events would be exactly the same, as it is the grammar and the adverb that indicate the order:
The train had already left when I arrived at the platform.
The adverb already is redundant, and used for clarity or emphasis. You get the same overall meaning with:
The train had left when I arrived at the platform.
However, you can also get the same order of events with different grammar - though some might be non-standard, it is natural in my experience as a native speaker:
When I arrived at the platform, the train already left.
The order of events is clarified by the adverb. However, things become different if you don't have that adverb:
When I arrived at the platform, the train left.
That would mean the train left at the point of arrival on the platform, thanks to the preposition when.
I arrived at the platform, the train left.
With the lack of preposition, these become grammatically independent clauses, and have more or less the same meaning as having them as two sentences:
I arrived at the platform. The train left.
This does not grammatically tell us the order of events, but the very fact someone would say that might tend to make people think that the person had been unable to board the train, so it left either before or soon after their arrival at the platform. The fact they are said in that order would, in my experience, tend to make people think that the train left while they were on the platform. That could be made clearer by using a preposition to indicate the order of events:
I arrived at the platform, then the train left.
The train left after the person arrived at the platform, but most likely before they could get on it - otherwise they wouldn't be saying it like that.
Your second example has both verbs in the past simple, but the order is likewise indicated with then.
Well, I couldn’t find my classroom, so I got to the classroom a bit late and then I had to sing a song in front of the other students!
The first clause sets a condition, why the rest of it happened, indicated by so. The second says they got to the classroom late, and the third says they were made to sing a song - had having its sense of compulsion, rather than acting as an auxiliary indicating the past perfect. The order of events would be clear without the then because the sentence makes more sense that way, but the then clarifies that it happened after getting to the classroom late.
The order of the clauses can be a sort of tie-breaker in determining the order in which the events described occurred, but grammar, adverbs and prepositions are the sure ways to do so.