The chinese state, as most authoritarian regimes are, is first and foremost concerned with maintaining power. They do this, primarily by suppressing political opposition. In furtherance of this goal, they restrict the flow of information that could encourage political opposition in any conceivable way. That is the main reason it exists.
They do crack down on piracy when economically beneficial, as I understand it. But it’s not the purpose of the firewall and, even then, they do have means to circumvent it.
Piracy.