Probably "orphan" hot lead
TL;DR - I think the Porch &amp; Garage were originally together - either both switched via the Porch switch or both always on via the Garage connection. Separated and working fine. Connecting the black made a mess and tripped the breaker and fried the switch.



Here is my theory:

Originally there was a regular (not motion sensor) light on the garage eave. It was powered from the porch light:


Panel -> Switch -> Porch -> Garage


At some point later on, the previous owner decided to put in a motion sensor light for the garage, but still wanted the porch light switched. It was easier to run power directly to the Garage than to run a new cable to the Porch. New setup:


Panel -> Switch -> Porch -> Garage abandoned
Panel -> Garage Motion


When you connected the wires with the switch off you ended up with:


Panel -> Garage Motion -> Porch


and both lights were on, despite the switch being off.

Then you turned the switch on and you got:


Panel -> Garage Motion -> Porch -> Switch -> Panel


which resulted in a short circuit and tripped the breaker and fried the switch.

Since the switch was now fried, now you are back to: Panel -> Garage Motion -> Porch and both lights are on.

If my theory is correct, then yes, you should cap those wires but then also you will find that the switch is dead - i.e., if you disconnect the wires from it and check continuity you will find that it does not complete a circuit no matter what position it is in.

There are some other possibilities, but the end result (for any scenario I can think of) is that you fried the switch (which is cheap &amp; easy to replace) by joining together two previously separate circuits. Separate them (black &amp; white) and replace the switch and you should be OK. Normally it is "all the white neutrals go together". However, in this case they are two different circuits and you could even some day decide to put the Porch on one breaker and the Garage on a different breaker - and then you absolutely would not be able to combine those whites because they would be different neutrals, so separate them now.

If my theory is correct, then after separating the wires and replacing the switch, you should find 120V on the "abandoned" wires when the switch is on.