Perhaps a WW2 Japanese fighter pilot was proficient with a pistol, and the "pistol-grip" of the M16 was the obvious grip?
I never get too fussed about movies and books. They go in different directions, and while a book author can write the most outrageously spectacular story, it's just words on paper and all the visuals and sounds are in the reader's mind.
A movie, on the other hand, has got to get everything on film and that can cost money or just be impossible..
If I were to write a story about the Anzac Cove landings at Gallipoli in WW1 - which I'm kind of doing right now and getting dragged into more research than I really need - I can write about the place as it was in 1915.
If my story were to get picked up and made into a movie, they can't just go along to the actual location, because it is quite different nowadays, with a two-lane road along the base of the slope rising from the narrow beach, which definitely wasn't there at the time. And if they go elsewhere, the terrain will be different.
And sometimes the needs and capabilities of the media take the story along different paths. Or maybe something occurs to the screenwriter and they put that in. Breakfast at Tiffanys was a book - and a good one - but the movie was much better. There was no Henry Mancini and Moon River in the book.
I was a student of popular culture at uni. and I watched a lot of classic movies and read a lot of great books. I even watched The Final Countdown but I fell asleep. Sorry.