Hard to tell what was in the mind of the original installer, but I know of no reason for that configuration. Make sure you clean off all that paint, and replace the shutoff with a ball type shutoff. Since this is for the toilet, there actually should be a shutoff at the toilet, again, 1/4 turn ball valve.