The chooseRemoteRack() method in the default block placement policy was designed to pick from maximum number of racks. E.g. If asked to pick 2 and there are 2 or more racks available, the two will be on different racks. It wasn't implicit or accidental semantics. There was a specific logic in chooseRandom() that makes it happen.
This behavior is broken after
HDFS-11530 as this logic was removed from chooseRandom(). Now the result is unpredictable. Sometimes the replicas end up in the same rack.