Actors are creative people too. Several of Harrison Ford's most iconic moments were ad libs. Famously, in Raiders of the Lost Ark he was supposed to have a whip vs sword fight during the Marian is kidnapped sequence. But he wasn't feeling well, so he pulled his pistol and shot the swordsman instead, and then they rebuilt the scene around that. Also, Han Solo's "I love you!" "I know." moment was Ford.
"The writer writes, the director directs, the actor acts" is how you get the sludge Hollywood makes today.