First thing to explain is how to jump through the door blocks in the Wrecked Ship shaft. It requires opening the door at the top so that the ghost can appear there later, but first you need it to appear on a different screen, so jump down to that platform just above the shot blocks. The ghost needs to reappear under the door low enough so that Samus can unmorph without setting off the door transition. To get the ghost to appear low enough, you need to do a wall jump at a precise height and immediately morph, so Samus narrowly misses the top platform and the ghost appears before she lands. You need to freeze the ghost at its lowest point of hovering (if you can't double bomb jump onto it, it's too high), Samus should be able to unmorph and not activate the door transition. Use the X-ray scope to force stand without setting off the door transition, now because Samus' head is above the door, you can move upwards freely without triggering the transition.
When falling, vertical collision detection is done with Samus' feet. Once above the door, falling into the transition blocks from the other side will cause the transition to happen while Samus is above the room, i.e. she has Y-position of ~0x0FE0. All the door transition does to Samus' position is change the screen she's on, then add or subtract just over half a screen to it (I presume), so instead of the door placing her at ~0x00B0, it places her at ~0x0180, which is below the floor.
The loaded room (the room above the shaft) is 7 screens long and 1 screen tall, that's each 'screen' is 16x16=256 blocks, each block is 2 bytes of level data (which is the type of block, and its graphic), so the room loads 0xE00 bytes of level data, immediately following it is the room's BTS for each block (BTS is the parameter for the block's type), each block is 1 byte of BTS, so there's 0x700 bytes of BTS; if the room has a custom background, that will come next and is also 1 byte per block (this room does not); then there's 0x6400 - 0xE00 - 0x700 = 0x4F00 bytes = 0x2780 blocks of solid block. After that comes the BTS again, but this time, any BTS from previous rooms is kept that the current room doesn't overwrite, and eventually the custom backgrounds of previous rooms again.
All co-ordinates from this point on will be in blocks rather than pixels. Suppose the game needs to know what the block at (x, y) is, the game calculates that block as the nth block in the room, it does y*0x70 + x (0x70 is the width of the room). This formula holds when Samus is off-screen too, so when Samus is to the right of the room, the nth block is y*0x70 + (0x70+x) = (y+1)*0x70 + x, this has the effect of being in the same room but one block higher. Travelling right the width of the room 16 times is the same as travelling one screen down, in this 1 screen tall room, that means she will be 'under' the room.
When Samus is under the room, BTS is being read as level data, fortunately, most of the BTS is just 00, which corresponds to air. When Samus goes left of the room, that's the same as going right 0xFF screens and vice versa, i.e. going right 256 screens brings you back to the start. Going 'above' the room is the same as going down 0xF screens and vice versa. In this Wrecked Ship room, the data above the room is background data (always air).
With the knowledge of all of this, I can explain what's going on. Coming into the room, you're below the floor in BTS-data land. As Samus is travelling right, you get to see those two slope blocks over and over, the distance between consecutive pairs of slope blocks is 3.5 screens (because BTS data is half the size of level data). Because each time a room-width is travelled, every block is raised a row, Samus gets higher and higher until she's actually on top of the room (when there stops being solid blocks above her). A further 5 room-widths are travelled with Samus on top of the ceiling, with each room-width travelled removing a layer from the 5-row ceiling. Finally, Samus is inside the room, and it's only a matter of finding the door transition blocks for the left door.
Just as a note, when Samus reaches those purple blocks, that's actually uninitialised data, and in theory, that means this really shouldn't work every time.