The mentioned quote was written by Andrew Carnegie, who was a great admirer of Herbert Spencer, one of the developers of the Social Darwinism theory; and this quote reflects that philosophy.
Social Darwinism is a social theory that defends that the theory of natural selection of Charles Darwin has social applications in human communities. It is based on the idea of the survival of the fittest conceived as a mechanism of social evolution and the belief that the Darwinian concept of natural selection can be used for the management of human society, insisting on competition (ethnic, national, class, etc.) by natural resources or various social positions.
Social Darwinism is based on interpretations of Darwin's writings, which were originally put forward by Herbert Spencer, and later used for political purposes, with numerous supporters. Social Darwinism enjoyed great acceptance in academic circles and was a great influence in imperialist countries at the end of the 19th century and in the first half of the 20th century.