It's not a bug because it's not a bug. How would you propose they fix this non-bug anyway?
At the end of the first loop, $item contains a reference to the last item in the array. Just as $item would contain the value of the last item in the array if you weren't using references. In the next loop, $item still contains that reference so now you're overwriting the value of that reference. You can't assume the second loop knows anything about the first loop.
People might actually be relying on this behavior but not in the way that you're expressing here. References are not just assigned in foreach loops.