There is a little-known dash rule that is called the “summary dash.” It is used when a sentence has concluded and a clause refers back to the subject of that sentence. The clause is really an appositive to the subject of the sentence.
(There are other instances of a summary dash that we will save for another day.)
…It was something I never expected to discover — that the company was doing shoddy work.
…That is what I remember — that he was always late to work.