JWST is not designed to be serviceable
Sending a robot to JWST is moot, it is not designed to be serviceable by human or robot.
In the early days of the Webb project, studies were conducted to evaluate the benefits, practicality and cost of servicing Webb either by human space flight, by robotic missions, or by some combination such as retrieval to low-Earth orbit. Those studies concluded that the potential benefits of servicing do not offset the increases in mission complexity, mass and cost that would be required to make Webb serviceable, or to conduct the servicing mission itself.
Source: NASA
But why?
- JWST was designed 20 years ago, a lot has changed.
- JWST is already 20x over-budget and 15 years late.
- JWST is already pushing the limits of mass and fairing size and complexity.
- We barely do robotic service missions in LEO, nevermind L2.
- NASA doesn't have Moon-landing era budgets.
JWST is late and over budget
Remember one important fact: JWST is 14 years late and 20 times over budget. JWST development began in 1996. It was supposed to be launched in 2007. The budget was supposed to be $500 million.
Look at JWST in that context, a $500 million mission began in 1996 and scheduled to launch in 2007. A lot changed during that period when JWST was being designed and built, and a lot has changed since 2007.
We didn't (and still don't) have the capability to get a manned mission to L2, a sixty day round trip. We didn't have cheap SpaceX launches. Robots were not up to the task, the first Mars rover wouldn't be until 2004.
During this time, US human space flight capability went through a roller coaster. JWST began development in the hey-day of the space shuttle, through the the 2003 Columbia disaster and subsequent retirement, through Constellation and its cancellation, and now still waiting for Orion and the SLS.
Meanwhile, commercial orbital vehicles went from being a long-shot to send cargo to the ISS to sending crew and cargo to orbit cheaper and like clockwork.
During all this change, the JWST team was trying to get their telescope into space. As each new (and usually prospective) technology became available it was considered for the JWST. Each of these adds change and change adds risk. Maybe we can use the Falcon Heavy; a different rocket with different fairing dimensions. Maybe Orion can reach and service it; a spacecraft which doesn't exist needing a docking ring which adds size and mass.
We're just starting to do basic robotic service missions
There's an assumption that a robotic servicing mission of a complex spacecraft at L2 would be easy. We've never done that. We barely do it with humans in LEO.
We've never done a servicing mission beyond LEO, robotic or human. While JWST was being designed we'd never done a robotic servicing mission. We've are now only just beginning to test robotic service missions in LEO. A robot in LEO can be controlled in real time. L2 is five light seconds away. A robotic servicing mission to L2 is a capability we do not have.
For more about that, read the NASA article Astronauts, Robots, and the History of Fixing Things In Space.
JWST is already pushing the limits
Like your laptop or cell phone, repairability comes at a cost.
The other answers go into the issues involved in making it repairable: protecting the mirrors, protecting the sun shield, points to grapple and stabilize the craft, panels which can be opened, modules which can be removed... Even turning a bolt in zero-G is complicated.
JWST is pushing the limits of mass and fairing size for a mission to L2. It's already folded up to cram it into the one of the largest fairings available and its unfolding is extremely risky. Making it repairable would add mass and size making it more expensive and more complex and add more risk.
When NASA says something is "infeasible", they do not mean it's impossible. They mean they looked at trying to do it not possible for the mass, size, risk, schedule, and budget. And if anyone can find those feasibility studies, please comment.
Going to the Moon is a poor analogy
But over 50 years ago we could get a manned craft to 0.25M miles and back...
Yes, for $150 billion. NASA doesn't have that kind of budget anymore. Space flight is not so much about "is it possible" as it is "do we want to pay for it".
Getting to L2 is rather different than the Moon. Going to the Moon you have the Moon there to capture you and it takes about three days. It's like rolling a ball over a up a hill and downhill into a dip; you can go a little faster and there's a larger margin for error.
Getting to L2 is more like rolling a ball uphill and having it coast to a stop perfectly on top. This takes much longer, 30 days. We've never had people in a spacecraft beyond LEO for 30 days.
When you think "if we could go to the Moon, why can't we..." remember they're different mission profiles, NASA doesn't have that kind of budget, and our capacities have changed.
In the era when the decision was made, what you're proposing was a capability that was speculative at best. We are still not capable of a robotic servicing mission to L2, we are barely exploring them in LEO; JWST is already extremely complex, crammed into its fairing, and pushing the mass limits of heavy lift vehicles. For the original budget, it didn't seem worth it to add the expense and complexity and mass of making JWST serviceable by a speculative capability we still do not have.