Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
I've noticed that the "share" links on answers and comments note that they not only include the answer ID, but the user's ID as well:
Why does Stack Exchange do this? Obviously, it is tracking it, but for what purpose? Does this affect the user?
They include your id so you can earn the Announcer, Booster and Publicist badges:
as far as I know that's the only use of the user id in the link.
You get a badge for it. Who doesn't like incentives?
The three badges are Announcer (bronze), Booster (silver), and Publicist (gold).