It seem to me not close to the rim, but close to the spokes ?
This is due to the width of the caliper but also the width of the hub flanks.
The distance between the flanks of the hub depends of the model of the hub, for the same over locknut distance, some are narrower, some are wider.