A lot of Knock Sensors are mount to a very solid portion of the block where there is a lot of metal. Knock sensors on most BMW engines are located below the bottom of the cylinder coolant passage line before it joins into the lower case, they are mounted with long threaded bolts deep into the core.
I'd presume that the sonic shock wave of detonation can best be picked up on a thick solid portion of the block, and that the proximity to the combustion chamber is of less importance.