It says in SA OC Siman 309 Sif 3 that on Shabbos if one wants to carry a basket that has in it fruits for the purpose of the fruits themselves if there is a rock inside of the basket as well one must shake out the rock from the basket (in order that it shouldn't be a problem carrying a muktzeh item together with the fruit.) This is however only in a case where the fruits will not be damaged in the process (if they will be one doesn't have to shake out the rock.)
Why is this not a problem of borer (selecting) when one shakes the basket with the intention and purpose of removing only the rock from the basket that is mixed together with the fruits? It could be however that the wording of the poskim (Shulchan Aruch itself as well as the SA HaRav in Siman 309 Sif 5 and M"B in Siman 309 Sif-Katan 11) that one is shaking out the fruit together with the rock would show that there is no problem of borer in such a case (and that the intention was in telling the person to remove the rock was to do so together with the fruit.) However from M"B Sif-Katan 10 we see that if there is a possibility to take out the rock itself then that should be done. So my question again is removing the rock from the basket by way of shaking it, why is this not considered to be a problem of borer?