If you are using the maketime() function then the time step is calculated in accordance with the formula for the CFL number in the k-wave manual.
As the time step is dependent on the speed of sound specified in the grid and the CFL number, changing the media to a heterogeneous one will result in a different time step being calculated, and consequently a change in the time for the simulation.
I believe the best way to specify this is that the behavior of the wave at the boundary requires a smaller time step to accurately model, and a longer simulation time results because of this.