Those intermediate sets of glad hands are used for air brake testing. A five-well car has three sets of fairly standard freight air brakes, each handling the brakes on two trucks. To perform the full tests when the brakes are rebuilt you need to isolate each two truck set and the glad hands allow that to be done.