Why were the major entrepreneurs of this era referred to as robber barons by some and captains of industry by others?

explain complete sentence please