Although those 19M transit passengers have mostly paid their fares to British airlines, thus pumping money into the British economy and corporation taxes to the British government. Saying that transit passengers don't contribute to the British economy is like saying the City of London doesn't contribute because two foreign parties may choose to do business with each other there through a British intermediary.
BA pays bugger all Corporation tax because they invest and use legal methods to minimise it.