From a strategic point of view, it can certainly be valuable to reduce the list of Robots.
For instance, a Soldier might care to know about which nearby Robots are Enemies that are Lumberjacks within melee range.
For that, you can call:
senseNearbyRobots(rc.getLocation(), GameConstants.LUMBERJACK_STRIKE_RADIUS, rc.getTeam().opponent())
And it will return a list containing only enemy bots within strike distance, which you can iterate through to determine which (if any) are Lumberjacks.
But, as you mentioned, that costs the same bytecodes to run as running it un-constrained, but now you don't have to spend as many bytecodes looking through the list filtering out friendly robots or robots that are too far away.