Perhaps it's so expensive beacause it doesn't actually fire bullets but .338cal TOW missiles
Maybe. But I don't think they would be TOW missiles, TOWs are wire guided.
Even with our most advanced technology, there is a point at which we simply cannot, at this time (or in the near future) produce the miniature missiles needed for a "bullet" to be able to "steer".
Also there is the sheer physical constraint, that anything capable of being steered cannot travel as fast as a bullet. Guided missiles, no matter the size get their striking power from an explosive (a shaped charge warhead for anti-tank use, a simple explosive with fragmentation for anti-aircraft, generally).
With an explosive warhead, a high impact speed (kinetic energy) is not needed for penetration. A bullet relies entirely on kinetic energy for that.
Many things seen in Hollywood scifi have become possible, over the years. The laser sight on the .45 in the original Terminator was Hollywood magic, at the time the film was made. At that time, laser sights did exist, but were about the size of a carton of cigarettes, not small enough to mount on a handgun. Today, we have lasers small enough to mount
inside a handgun!
In the movie
Runaway, Gene Simmons had a pistol that fired a small missile, about the size of a .50BMG cartridge. It did steer (to a point). The gun took a thermal scan of the target before firing, and the "bullet" would steer and track in on the individual targeted (everyone's thermal image being unique, according to the script writers). They at least played fair enough with physics that the "bullets" could not make sharp turns, and were slow enough that if you timed it right, could be dodged.
We aren't there yet, and I doubt we will be for quite some time.
The prototype rifle & grenade launcher that fires the 20mm programmable grenades is a neat concept, but still has serious issues that need to be resolved before it could be a practical weapons system. The last I heard, the two biggest issues were the weight of the weapon (23+ pounds in prototype, the goal being 18 or less) and particularly the cost of the ammo.
A grenade that you can program to detonate at a specific point would be a useful thing, BUT, the last I heard the rounds were projected to cost in the neighborhood of $20,000 EACH!
While Uncle Sam doesn't mind spending $1 million on a cruise missile, $20K for each grenade x number of infantrymen x number of grenades fired per engagement is too much, even for us. Even if the price came down to half that, its still too much. There are cheaper and just as effective (if not more so) ways to kill the enemy.