This is actually a Whimbrel rather than Eurasian Curlew - if you look closely you can see that the head has a well-marked pattern with dark eye-stripe and pale above the eye. They're not very common in winter (only 1 or 2 present now).
I expect it was feeding on crabs, which seem to be the favorite food of Whimbrel. A you saw, they're very good at finding the burrows and pulling the crabs out.