Final answer:
The dash in the sentence is used to indicate an abrupt change in the sentence.
Step-by-step explanation:
The dash in the sentence "The race went on in spite of the heat - what exactly were they thinking?!" is used to indicate an abrupt change in the sentence. It signifies a shift in thought or tone within the sentence. In this case, the dash is used to add a rhetorical question that expresses surprise or disbelief about the race continuing despite the heat.
Learn more about the use of a dash to indicate an abrupt change in a sentence