The law only prohibits the sharing of data if it's being used for immigration law enforcement. ICE doesn't just bust undocumented migrants, they also investigate all kinds of other crimes (like smuggled contraband), which is something the CHP would also presumably be involved with. It's perfectly legal to share data if it's not being used in an immigration case.