Would it even be feasible under science fiction logic? It would allow nuclear weapons to be mass produced if the nuclear pasta could actually be collected and contained safely.
- Surface gravity of a neutron star is in excess of 1011 Earth-gravities. What sort of mechanism are you proposing that can lift up bulk quantities of matter from that sort of gravitational field? Teleporters? If you can teleport, you can almost certainly produce much more interesting and sophisticated things than mere "nuclear weapons".
- The nuclear pasta isn't quite on the surface of a neutron star. You're going to have to remove the layers of more boring matter above it, which will have been crushed to incredible densities and must be moved under that same ridiculous gravitational field. What sort of mining equipment will do this? Why can't you use that as a weapon instead?
- Nuclear pasta is degenerate matter, that needs the extreme gravity of a neutron star in order to form and remain stable. If you want to take it away with you, you're going to need to apply forces to it comparable to those it experienced whilst buried in the crust of a neutron star. If you can generate those sorts of incredible forces on a whim, why not use those force-generating mechanisms as weapons? Note that if you don't keep it under this ferocious pressure, it'll revert to regular matter, and release a lot of energy whilst doing so.
- If you have the technology to confine nuclear pasta, then you also have the technology to create your own degenerate matter and skip stages (1) and (2). Neutron star mining is a bit pointless, really.
So no, not remotely feasible. Even if you did handwave the technology you'd need to harvest it, you'd be better off a) using that technology to create your own degenerate matter or b) using it to make other kinds of weapons instead.
Setting aside the issue of what exactly Nuclear Pasta is, and if it would still be useful after removing it from the star (I don't know, so I won't tackle it)…
No hard-science fiction technology I can think of would allow anything we could build to survive on the surface of a neutron star. The gravitational field on a neutron star's surface is about 200 billion times stronger than it is on earth, so that an object dropped from a height of less than a meter would hit at speed of over a thousand kilometers per second - if it wasn't spaghettified first. And even if you could build something that could survive in those conditions, you'd have to get there first. Neutron stars spin incredibly quickly, such that the surface is moving at a significant percentage of the speed of light. The fastest one we know of is spinning so quickly that its crust is moving at about 0.24c, nearly a quarter of the speed of light. Just getting a ship up to that speed strains the bounds of hard science fiction.
Assuming that you manage to somehow both land and survive on the surface, you'd then have to get off. The escape velocity of a neutron is around one-third to one-half the speed of light (0.3 to 0.5c). If you thought matching speed with the surface was hard, getting off will be pretty much impossible.
Within the bounds of hard science fiction, about the only way I can think of to get ANY material off a neutron star successfully would be to hit it with a massive projectile traveling at incredible speed, such that it blows off a chunk of the star at over half the speed of light... this would be incredibly hard to do, and the chunk that gets blasted into space wouldn't be one solid piece that you could harvest so much as a spray of relativistic particles that would present a hazard for anything in its path.
So, hard science is out. Your best bet is to go for soft-science or future-fantasy stuff like Star Trek's transporters, which go around the gravity and velocity issues via the medium of handwave. And at that point, you're probably beyond the need for nuclear pasta to produce nuclear weapons anyway.
The very simple answer to your question is
The reason is simply that, hypothetical nuclear pasta can indeed only exist in those conditions on the surface of a neutron star.
(Note too that as others have pointed out, hypothetical nuclear pasta has no conntection at all to "nuclear bombs").