Start the manipulation with an ordered set to see that only the first two entries become interchanged forever:
$i$ does not escalate beyond 2 ...
Manipulate[Module[{pivot, sample},
pivot = n/2; sample = lst[[i]];
If[sample < pivot,
PrependTo[lst, sample]; lst = Delete[lst, i + 1]];
BarChart[lst, GridLines -> {None, {pivot}}, BarSpacing -> 1]],
Row[{Control[{{i, 1}, 1, n, 1, Trigger, DisplayAllSteps -> True,
AnimationRunning -> False, AnimationRepetitions -> 1}],
Dynamic@i}],
{{n, 30}, None},
Initialization :> (lst =(* RandomSample[Range[n],n]) *) Range[n]) ]
The iteration took place if I resized the notebook!
Manipulate[With[{pivot = n/2, cut = n/2, sample = lst[[i]]},
If[sample < pivot,
lst = Join[RotateRight[Take[lst, i]], Take[lst, i - n]]
];
BarChart[lst, GridLines -> {None, {pivot}}, BarSpacing -> 1]],
Row[{Control[{{i, 1}, 1, n, 1, Trigger, DisplayAllSteps -> True,
AnimationRunning -> False, AnimationRepetitions -> 1}],
Dynamic@i}],
{{n, 50}, None},
Initialization :> (lst =(* RandomSample[Range[n],n] *) Range[n])]

I suspect there is a problem with the iterator
$i$.