For example, when the United States attacked Iraq in early 2000, not every newspaper and TV station had the ability to send reporters to cover the battlefield like CCTV. Therefore, there needs to be a comprehensive organization that can improve the media for all other countries, which is the news agency. News agencies provide paid information, that is, other newspapers or other media need to pay for the news information they get.
The media is responsible for disseminating information, so Xinhua News Agency is naturally a part of the media.
The relationship between Xinhua News Agency and People's Daily is just like the relationship between shopping malls and customers.