Why do we need dp charges?

Quoting from here.
DP charges include Depository charges and Depository Participant (DP) charges. The Depositories are NSDL & CDSL and Depository participants are members of Depositories with whom you open your demat account (Eg: IL&FS). DP charges are applicable whenever you sell any shares from your demat account. This charge is a source of revenue to the Depositories & its participants. Similar to how Exchanges charge Transaction fee, Brokers charge brokerage, Depositories & DP’s charge DP charge.

Brokerage and depositories are two separate entities.

Each scrip you sell counts as a transaction. Even if you sell the same scrip multiple times in a day you will just be charged once.