The history is not dumped to file until after bash exits; until then, it's in memory. You can disable the history dumping to file with the HISTFILE environment variable. From the bash man page:
The name of the file in which command history is saved (see HISTORY below). The default value is ~/.bash_his-
tory. If unset, the command history is not saved when an interactive shell exits.
There are actually a lot of ways to customize the history: how many lines are saved, where they are saved, which commands to ignore, etc.