Thats truely awful. I hope whoever started this gets strung up for it. Realistically, though, I have seen situations like this before. Some tenant / former tenant / tenants friend offers to "Help out" by making a few electrical upgrades, and, next thing you know, this happens. The landlord may have saved a few bucks at first by not hiring someone qualified, but, in the end, they pay. Or have no power.

Additionally, in the area i'm from, we are not allowed to use flex line like that for runs more than 6 feet. I have to check, but, I also think we cannot use non-metallic cable.