I’ve heard that transferring a load through axle is bad and can lead to the axle warping, and instead you should transfer load through the gear / pulley / etc being directly coupled to the wheel / whatever to articulate and the axle just operating as a guide. How is this accomplished with gears or pulleys that don’t have mounting holes? Do you need to drill your own mounting holes? How strictly does this need to be followed?
Look up “live axle” vs. “dead axle”.
If your axles are properly designed, you shouldn’t have to worry about warping for a live-axle (torque through axle) setup. If they aren’t properly designed, you’d have to worry–and that goes for the “dead axle” setup.
For putting holes into a gear/sprocket/pulley/wheel for a “dead axle” setup, you’d carefully align and drill, or make an adapter.
This advice is a pretty big sweeping generalization. You can totally transmit torque through axles if you don’t exceed the limitations of your axle. That said, generally if you easily have the option to use a dead axle, it generally simplifies things to do so.
So no, this isn’t a general rule that needs to be strictly followed at all. It’s just a design consideration.
If you don’t have any good center finder, you can find the center of a sprocket pretty easily by drawing diameters through the centers of opposite teeth (assuming an even number). Draw several to reduce the error. Though honestly, I can’t think of any sprockets which don’t have at least a center hole.
The main problem you’d have with a slightly misaligned sprocket is that the length of the chain run will increase as the offset moves away from the other sprocket, and decrease as it moves toward it. This results in cycling of the tension in the chain/belt, stressing it and increasing the likelihood of it jumping off or breaking.
An off-center axle bore in the wheel will cause similar changes and stresses in vertical loading on the wheel and axle.
Assuming we’re talking for FRC uses…
In recent years it’s been easier to simply buy sprockets/gears/pulleys that already have mounting holes from vendors like AndyMark or VexPro so many teams don’t worry about adding their own mounting holes. If you have a special part that those vendors don’t sell that needs mounting holes, then I would refer you to the posts above.
In general terms, as others have already said, you most certainly can transfer load through an axle, and it’s quite common practice for FRC teams to do (any wheel that is directly driven by a gearbox output shaft is a common example of this). The biggest consideration in my opinion, aside from the strength of the axle itself (since even a dead axle can yield under too much load) is the durability of whatever is being used to transfer torque through the axles (generally in the form of either hex stock or a “key”) to whatever you’re driving. Not having a large enough hex or key (or using materials that are too weak for the application) can result in stripping the shaft and causing it to free spin inside the hub it’s trying to power. As long as you take both of those into account, you shouldn’t have any issues using a “live” axle.