Answer:
Because the whip is a reminder to the black soldiers that they were slaves.
Step-by-step explanation:
In the movie Glory, the 54th Massachusetts Infantry Regiment was one of the first all-black regiments in the Union Army commanded by Captain Robert Shaw. When Trip (Denzel Washington) allegedly deserts he is punished. Now usually the punishment for an alleged deserter in the army can be flogging with any other object. But using the whip is quite symbolic as these reminds the black soldiers that they were still slaves. This is the main reason why shaw's friend protested the use of a whip. This further justified when Denzel Washington's character, Trip, had his shirt torn off. You can see the marks from previous whipping on his back.