I am open to corrections, but at first glance, I don't think the WAP7 in the rear is banking the train.
Even if loop lines etc are available, most trial runs on single lines are being conducted with locomotives at each end of the train. It just makes the job simpler and quicker. In some cases, many lines are being opened without completing the loop lines and their signalling (as these are not required straightaway due to the low traffic on the lines).
Starting a locomotive that is completely turned off,...
more... takes some time. The LP has to run through a lot of checks before starting the loco up. So, usually locos are left to idle, instead of being turned off.
In this case, since this was a trial run just for the VIP, the train was probably expected to turn back within a short time. In such cases, there is no point in turning off the loco. The panto is up, but the loco is just idling and not providing any power. This way, when the train reaches it's destination, the LP just has to switch cabs and the train can start back immediately.