When I extract tracks with EAC and write them to a CD-R with a burn program, I get 2 second gaps between each track. Why does EAC insert them?

EAC does not insert the gaps. These gaps are inserted by the writing program. There are two possibilities how these gaps could occur. Once if you write in TAO (Track At Once), there have to be a gap between tracks, so use DAO (Disc At Once) instead. Second, if you already use DAO, you should examine that program options, somewhere will be a flag where the standard 2 second gap could be deactivated.