When a dispenser deposits a shulker box where no block exists beneath it, the shulker box aligns in the same direction as the dispenser. However, if there's a block underneath the shulker box's placement, it will face upwards. The concern is that this can be any non-air block. The anticipated behavior would dictate that only blocks capable of supporting other blocks atop them should prompt dispensers to consistently orient shulker boxes upwards. Presently, even blocks such as grass, snow, torches, light blocks, water, lava, and others prompt dispensers to position the shulker box facing upwards. As noted in MCPE-33946, this behavior appears to differ on the Bedrock Edition, where hoppers aren't recognized as valid supporting blocks for shulker boxes. Relates to MC-107661, MC-107841 and MC-116879.
this should be marked as intentional. It is a very useful feature for technical development