The Taz (Y.D. 242 : 13) writes “ it is not necessary to stand up when the Aron Hakodesh is opened. People who do so, do it for the Kavod of the Sifrei Torah."
The Chasam Sofer (Ch.M. 73) writes , "Someone who is suspect of swearing false oaths, in order to scare him, we may not force him to lay down in a casket and make the Shevua (oath).
One of the reasons is because, he needs to stand while the Aron Hakodesh is open*.
*They used to open the Aron Hakodesh and light black candles,
to scare them, as not to make a false oath.