The Majorana zero mode in the semiconductor-superconductor nanowire is one of the promising candidates for topological quantum computing. Recently, in islands of nanowires, subgap-state energies have been experimentally observed to oscillate as a function of the magnetic field, showing a signature of overlapped Majorana bound states. However, the oscillation amplitude either dies away after an overshoot or decays, sharply opposite to the theoretically predicted enhanced oscillations for Majorana bound states. We reveal that a steplike distribution of spin-orbit coupling in realistic devices can induce the decaying Majorana oscillations, resulting from the coupling-induced energy repulsion between the quasiparticle spectra on the two sides of the step. This steplike spin-orbit coupling can also lead to decaying oscillations in the spectrum of the Andreev bound states. For Coulomb-blockade peaks mediated by the Majorana bound states, the peak spacings have been predicted to correlate with peak heights by a π/2 phase shift, which was ambiguous in recent experiments and may be explained by the steplike spin-orbit coupling. Our work will inspire more works to reexamine effects of the nonuniform spin-orbit coupling, which is generally present in experimental devices. arXiv:1811.06136v3 [cond-mat.mes-hall]