Throw It In/Anime and Manga

"Robot 1: "Sir... will Sonic survive?"
 * It's not dialogue, but when Digimon Tamers head writer Chiaki Konaka saw that Jianliang's little sister, Xiaochun, was included in the opening song's shot of characters holding up their Digivices, he decided to make her a Tamer. Similarly, when he saw that the character designer had drawn so many pictures of her infamous "Terriermon torture", he decided "it would be criminal" not to include scenes of it. Xiaochun and Terriermon even have an Image Song together.
 * In-universe example in Midori Days: Seiji and his gang of delinquents get hired to play minor parts in a movie starring their favorite actor. During the final scene, the hero is mortally wounded. The boys are supposed to have a big mourning scene as he dies, but get a little too into the moment, and beat the crap out of the guys who "shot" him in revenge first. The director decides to keep it.
 * Because most anime is animated first and then dubbed to fit with ADR, in contrast to the Western practice of recording the voice first and then animating to the voice, there is a tendency for dialogue to be more ad-libbed.
 * When Norio Wakamoto was brought in to record the voice of Chiyo-chan's "father" in Azumanga Daioh, all of his scenes had already been scripted and animated. While he kept to the scripted lines, his delivery invariably ran longer than the animation (in one case, over a full minute longer). Rather than rerecord his lines, they reanimated the scenes to match them, because he's Norio Effin' Wakamoto.
 * When Jan Valentine in the Hellsing OVA storms into the Council of Twelve's meeting room and faces a dozen weapons pointed in his direction, the original seiyu doesn't say anything before being shot. The English dub VA however ad-libs in a hilarious 'Oh f*ck me' comment.
 * The Lupin III special "Crisis in Tokyo" isn't a particularly funny movie in the native Japanese, but the dub had a ton of ad-libbing done by the actors (though not to the point of it being a Gag Dub), particularly Christopher Sabat who voiced Jigen. It worked, it's one of the funniest Lupin movies ever released in the states.
 * The Funimation dubs of the Lupin III films and specials feature a lot of this.
 * In Lucky Star, Tsukasa's seiyuu Kaori Fukuhara said the directors encouraged ad-libs. Her famous "barusamiko-su" line was one of those moments.
 * According to legend, the names of the main characters (A-Ko, B-Ko, and C-Ko) in Project A-ko began because the creators couldn't think up good names for the characters, and started referring to them as A, B, and C during preproduction.
 * In Durarara, the kitty ears on Celty's helmet was originally a joke by Narita, but it was kept because the character designer really liked it.
 * The Axis Powers Hetalia anime apparently has a lot of this too. France and England's seiyuus Masaya Onosaka and Noriaki Sugiyama said in an interview that most of their characters's fights are ad-libbed.
 * In Afro Samurai, following the death of, Ninja Ninja's "eulogy" ("Add one mo' body to the body toll, may god rest this po' bastard's soul") was impromptu on Samuel L. Jackson's part.
 * The Japanese version of Sonic X used this a few times. There is a scene in "Super Sonic Appears" where it looks like Sonic is going to get killed. His robot servants ask him if Sonic will survive to which Eggman was meant to have stayed silent (in thought of whether he could actually kill Sonic or not) however the voice actor jokingly said (in Japanese of course): "Of course! No one ever dies in animes!" The other voice actors decided to just go along with the joke causing the scene below to accidentally get created; the show's makers found the scene so funnily 4th wall breaking that they ended up keeping it in.

Eggman: "Of course! No one ever dies in animes!"

Robot 2: "Animes?"

Eggman: "Of course! The good guy never gets killed in a anime and the bad guy like myself never wins. In other words, not matter how hard we try, the show makers will always make us lose!""


 * In The Melancholy of Haruhi Suzumiya, during the Day of Sagittarius episode, each of the SOS-dan members was commanding a space fleet, and each of them was shown in a bridge filled with Bridge Bunnies of their own imagining (It Makes Sense in Context). Mikuru's crew (a bunch of stuffed animals) were lifted from doodles that Aya Hirano (Haruhi's seiyuu and occasional Cloudcuckoolander) had drawn in the margin of her scripts.
 * According to Tiger and Bunny's scriptwriter, Nishida Masafumi, Origami Cyclone's habitual photobombing tendencies were something that he suggested to the producers as a joke. He was surprised that they agreed with the idea.
 * In Detective Conan, the character Wataru Takagi did not originally exist. He was a nameless character. In one scene, Inspector Megure asks his name and his voice actor (Wataru Takagi) responded with his name. Gosho Aoyama, the mangaka, kept it in.
 * On a whim, the artist of Busou Renkin decided to add a butterfly mask to the Big Bad of the first arc. This turns out to be fairly significant, as he is a recurring character, and the butterfly motif drives most of his personality.
 * In Inazuma Eleven GO, Hirofumi Nojima ad-libbed a Kiai as Kurumada, which sounded something like "shupoh!" It has since more or less become Kurumada's trademark exclamation.