Grant In Iowa
Stain is made up of colored particles. These particles are generally too large to penetrate most common woods. So the stain really just grabs on to the surface of the wood and more so areas with pores. If you stain red oak, for example, more of the particles collect in the more porous areas where the "grain" is.
The amount you sand can also effect how readily the stain will "stick".
If you want a penetrating color, Dye might be the way to go. Dye has much smaller particles and can penetrate many common woods. The advantage is that a dinged piece of dyed wood won't reveal its true color, though it will still be an ugly spot.
Do some test pieces and cut them in half with a saw to do your own experiments on your own wood.
For me, I largely prefer to just keep the wood the natural color. Some scoff, but I have never really had issues that way. I have yet to hear anyone say that my work "needs stained".
Grant in Iowa