The six most popular ways of mounting rails are lag bolts, threaded inserts, expansion bolts, tie plates, t-nuts, or floating nut plates. Lag bolts are very coarse threaded bolts used primarily by contractors. It is a strong bolt that can provide a lifetime bond. However it was never designed for disassembly. After multiple reassemblies the holes will begin to strip out and the bolts holding power will diminish.
Threaded inserts are much like a lag bolt on the outside and can pop or slip out after time.
When a bolt is tighten against them, the force of the bolt pulls against the insert and the insert pulls against the rail. At high torque the insert will begin to pull out of the rail. As the bolt is driven into the insert it spreads and is forced apart. This works well in concrete because concrete will not separate. Wood on the other hand will bend and mold to the inserts.