You want your stairs to follow the corridor orientation (I put the origin to the geometry so that we can see the XYZ local or global orientation):
The Array will use the local XYZ to duplicate the instances (here the object local orientation is still aligned with the global orientation).
For example if you set 1 on the X axis in the Array modifier it will mean that your mesh will be duplicated on the local X axis and that the duplication will perfectly stick to the original mesh (and if you enable the Merge option, once you'll apply the modifier, the vertices of the original and of the duplicationss will automatically merge).
If you rotate the mesh in Edit mode, like you're trying to do currently, it will make the work a bit more tedious than if you kept it aligned with the local axis, because the values that you'll need won't be 1 anymore, you'll need to find them visually. In some cases you need to work that way, but in your case it would be much simpler to do that:
- In Edit mode, align back your stair with the global axis (or recreate it):
- Go back in Object mode and rotate your stairs on the Z axis so that they follow the corridor orientation, to be more precise you can press Shift after having pressing RZ to rotate:
Also, this method has another advantage, if you need to make some changes to your stairs, you won't have to change the XYZ values, the instances will automatically align correctly, as they are still aligned with the local axis.