Companies allowed more harmful content on user’s feeds, knowing their algorithms ran on outrage, BBC hears.