Here's why:
* Complex sentences have one independent clause (a complete thought that can stand alone) and at least one dependent clause (a thought that cannot stand alone).
* Independent clause: "I ate dinner"
* Dependent clause: "when I got home" (This clause depends on the independent clause to make sense.)
The dependent clause is introduced by the subordinating conjunction "when".