Why not? If they used 3 seconds of somebody's music, you can be sure they'd have to give some credit for that - at the very least!
Look at the average credits for the average film. They go on forever, and there are tons of people in them. It's not like crediting somebody is a big deal, in terms of the cost of giving it out. There are plenty of people whose contribution to the film was small, just like the author of this code, but they get credited anyway, and that's just as it should be - the credit is for the contribution, not for the extent to which it makes the film a success.
I think a better example would be a scene where someone is reading a book. I kind of doubt they would give credit to Earnest Hemingway in the credits, but maybe I'm wrong.
The difference here is that it appears we are meant to believe a character in the movie wrote the code. I may be wrong since it's hard to tell from a promo what is happening, except for LOTS OF EXPLOSIONS.
"Not that it's needed, but I hereby grant any permissions needed for the inclusion of my code in the movie in any format it's released in. If anyone involved would like to show gratitude for this, I'd like to receive a copy of the movie on DVD or Blu-ray after it's released that way, with either the cover or an insert signed by the director or one of the named actors in the movie - or just a spare poster or bit of promotional material if planning something for after DVD release is going to be a headache.