• the men are asked to undress by themselves?

    They are outnumbered, guns are being pointed at them as they are undressing, armored vehicles watch the whole thing and it’s right in the open. There’s at least one potentially spicy drone circling overhead. If any one of these people wants to die a martyr’s death, that’s all he’s going to achieve.

    Then why is there videos of people sitting there for hours?

    No idea what you watched, but there is no multiple hour long video of this event, only short snippets and a handful of photos. Instead, they are being shown stepping into trucks, with some men already sitting there.

    The men have their hands tied behind their backs.

    That’s after they have undressed and surrendered their weapons. There is a video of a man bringing their guns to the Israeli soldiers one after the other, over his head.

    Why would someone with the goal to fight the IDF wait to get detained to then try such a ridiculous maneuver, where the margin of success is nonexistent and death is certain?

    Ask Japanese soldiers that pulled these stunts in WW2, North Korean soldiers that did so during the Korean war, Vietcong that fainted surrender, various Islamist extremists who have done exactly this in the past. It’s not rational behavior, because these men are being indoctrinated into a very contradictory, very irrational belief system. They are being taught from kindergarten that dying for your cause is the most honorable thing a man can do.

    If there is a true military need to act like this, why did we not see these kind of pictures on a regular basis from the Ukrainian military?

    Except we do. I have seen exactly this in photos and videos from Ukraine - except that the Ukrainians were far rougher with their Russian detainees and the colder temperatures made the whole deal far less pleasant for the POWs. Footage of this kind is very rare though and for an obvious reason: People who aren’t well informed easily get outraged and it can be used for counter propaganda.