You do understand that ICE also does customs enforcement like stopping drugs and trafficking as well, right? Not everything in ICE is immigration.
CBP's job is to protect the border and stop drug and people trafficking entering, whereas ICE's original purpose was to enforce immigration law within the US.
While not "everything" ICE was tasked with was immigration, that was their bread and butter. Where the vast majority of their workforce and spend went.