I see many old answers contains expired links. Whenever I click on a link it show that links has expired.
I'm not getting why users are providing expired links in an answer?
It is not that they provide expired links: they provide live links, time passes, and the links then expire. This happens very often, and that's why we prefer to avoid depending on links when answering questions on the site, unless they are reliable. Even in this case, it is much preferred if the answer does not depend on the link to be useful, and it is self-contained. See here and here for further discussion.