Wiring – Two Fixtures, one Circuit. How does this work

wiring

I have two adjacent light switches in a bedroom. One switch is intended to operate 4 recessed lights, the other is intended to operate a ceiling fan/light (via a wired remote). When I bought the house, both switches worked and operated the fixtures independently. Some time later the remote switch stopped working, so it was removed (I did not note how it was wired, thinking it would be easy to wire). Fast forward 2 years later to today, I'm finding only only one HOT wire in the box, and one circuit wire that leads to BOTH the recessed lights and the ceiling fan (confirmed via operation or continuity test). There are ground and neutral wires that are wire-nutted and another black wire that is neither hot nor connected to the fixtures.

How is this possible?

I can't seem to wire both switches to operate the circuits independently, but I'm fairly certain is was wired as such (have had the ceiling fan switch removed for some time).

enter image description here

Attached a clearer picture. Wire summary follows:

Black wire, lower left, yellow nut (HOT);
Black wire, lower right, yellow nut (leads to ceiling fan AND recessed lights);
Black and white wires, upper right, white nuts (no apparent function)

Best Answer

UPDATE: As it happens, I finalized realized I had disconnected wires in a junction box in an adjacent closet months prior to noticing what I thought was a dead fan switch (enough time had passed that I didn't link the junction box to the switch). Reconnecting the wires in the junction box solved the problem and allowed the previously useless romex bundle to now have a function (the romex is basically an extension to the switch box). Thanks for all the help.