What are these for

These two connectors are hanging just behind the alt. The car ran and drove without them hooked to anything. Wires are blue/purple. What are they for?