A mechanically based approach to non-local beam theories