It looks like the person who fitted it, in the 1st place, did it right, by using flex instead of T+E, & then some idiot came along, & wanted to run another light off the floodlight cable, so cut the floodlight cable put in an indoor JB, instead of a waterproof JB, & ran another piece of flex from the JB to their new light.
How many times do you see Floodlights, or outside lights wired in T+E, which is clipped to the wall with no protection from the sun?
What is the other piece of flex running? Is it another Floodlight?