The first light is working with the switch where power enters but the second is not.
It is not uncommon for a circuit to be configured so that two wall switches in a single double gang box control two different light fixtures.
The red wire between the lights is connected directly to the hot on L1 and then run to the next light.
You can create a detailed diagram like this one or create a simple outline of the layout.
With this arrangement, two lamps can be plugged into the same outlet and each can be controlled separately from two different locations.
Perhaps most of us might have already used it without paying much attention to how it works.
It should also help in understanding the functions of each type of switch.
This is where you need to connect your appliances.