Privilege escalation applies only to the curl process (and in the second example, to the child shell), and not to your (parent) shell, and therefore to the redirect.
One solution is to redirect inside the child shell itself:
sudo bash -c "curl $LINK >a.txt"
Another rather idiomatic option is to use tee :
curl $LINK | sudo tee a.txt >/dev/null
For curl in particular, you can also write the process itself directly to a file:
sudo curl -o a.txt $LINK
source share