It's not that surprising. When a value is passed by reference, it means that the function can alter the variable and the changes will be visible outside the function. Take this code:
$byValue = 5;
function passByValue($variable)
{
$variable++;
echo 'Value inside ' . $variable . PHP_EOL;
}
passByValue($byValue);
echo 'Value outside ' . $byValue . PHP_EOL;
$byReference = 10;
function passByReference(&$variable)
{
$variable++;
echo 'Value inside ' . $variable . PHP_EOL;
}
passByReference($byReference);
echo 'Value outside ' . $byReference . PHP_EOL;
What it means is that the passByReference function needs to have access to the memory location where the variable is stored in order to change it and for that memory location to exist, you need to have a variable pointing to it. However the result of a function is "volatile" in that fashion, it will get garbage collected if it's not stored in a variable, thus cannot be passed by reference.
The end(), next() and so on function need parameters to be passed by reference to alter their internal states.