When "Allow Trim of MIDI items when splitting" (aka destructive editing of MIDI items) is disabled in preferences, it may result in the underlying MIDI *source* start/end being different from the visible MIDI item edges, which in turn may result in some unexpected behavior, as also discussed in
"Extending MIDI take" error (video) and other threads.
To quote my post from that thread:
In the project, the MIDI item's underlying MIDI source extends beyond the left border of the item, so the source's start point is hidden to the left of the item.
When moving a loop marker, REAPER must decide whether to stretch/shrink the loop region relative to the preceding marker (to the left), or relative to the next marker (to the right).
If I understand correctly, the preceding marker usually takes priority, but if it is not visible, REAPER will use the next marker:
The stuff on the left side may also move if tempo is changed across the hidden parts of the MIDI source, as discussed in
https://forum.cockos.com/showthread.php?t=182196: