It's a popular story, but entirely false.
NASA didn't spend all that money; nor did Russia spend zilch and get a half-chewed pencil.
Supposedly, most agencies now use the "space pen", which was developed privately. However, it sells widely (and it's not cheap), simply because the public like to think they're buying a pen that will write upside-down on a block of butter in a freezer 500km above the earth. Everybody wins. Space agencies (if they want it) get a pen for a tiny fraction of the cost of anything developed in-house; some pen manufacturer gets millions for a mediocre product; people with more money than sense can buy a pen that copes with a wide range of environments (until they lose it).
In my pocket, I keep an aluminium pen that weighs much, much less than the chunky steel "space pen". Perhaps it would fail if I ever accidentally went into space, but I'm willing to make that trade-off. I also have a Mont Blanc desk set, which is probably even less durable, but my desk is quite unlikely to become greasy, frozen, or weightless.