Well Ace himself is a pirate too and a commander of one of WB's divisions, so it's not all about that concpet you mentioned why he is about to be executed.
Also since it's the prisonders on level 6 you were wondering about, I think that at least some of them have devilfruits. now we don't know how it exactly works yet, but it's heavily hinted that they regrow after the death of the user, so would they kill them, they'd set those powers free again, which only seems to be worth it in a situation like this with Ace where they can get rid of many, many pirates.
that and that they are quite sadistic torturing those bound to die anyway (do they even interrogate the pirates?)... or it's just a really prolonged execution going on like in a gigantic death machine <.<