The guy crucified after being beheaded was apparently a “Sunni militant”, which is probably a way of saying ISIS or al Qaeda. This follows a failed ISIS attack on a Saudi government building a week ago:
https://www.voanews.com/a/killed-in-failed-attack-on-saudi-state-security-building/4885030.html
I doubt that the Saudi justice system is that “just” - but as to the form of execution, it does not seem anymore barbaric than our electric chair or a firing squad (still an option in Utah). Our giving them a sleeping pill and poison would seem the best way to go, but even that has problems.
Beheading with the sword may give the person some status in their religion as well? (Like the Vikings dying in battle believed they got to Valhalla automatically, or the Mormons and the firing squad.)
The display of their headless bodies is pretty bad - but I suppose it might serve as a deterrent. And it’s not like the deceased is going to care.