Why did my headlights kill my car?

It's entirely possible.
I also had a starter relay failure at about the same time as the total electrical failure. I replaced the starter relay yesterday. Both the battery positive cable and the main electrical feed from the battery go through the starter relay. I wonder if somehow the failure of the starter relay had something to do with this.