Lincoln was a deist and a pragmatist. He was pointing out that success is important, no matter how you do it. It's more important to succeed at something than to follow artificial 'rules' that might limit your chances of success. You measure success by the success itself, not by adherence to questionable philosophical principles.