Britain was an industrialized country, but industrial exports were not the main export of the British economy. Before 1939, the largest export product was coal. And Britain ran regularly a trade deficit for decades, which was covered by exports (both industrial and non-industrial) only by one third of the total. The other two thirds were covered by the profits of its large shipping industry and the returns on foreign investments, both in colonies like Burma or India and in countries that were not colonies like Argentina or Iran.
But when studying the dynamics of British economics in the colonial era we shouldn't be too naïve either. Once Britain controlled India, it was used as a platform to control the whole Indian Ocean and to intervene in other countries. The explotaitive agreement with Persia that led to the establishment of the (very lucrative) Anglo-Persian Oil Company in the early XX c. was backed in the end by the might of the British Indian Army. And Burma or Malaysia fell in British hands thanks to the employment of Indian troops too. Both colonies were "profitable" in an economic sense: Burmah Oil was the first large British oil company that started British investment in this important sector, and by the late 1940s and early 1950s the exports of Malaysian rubber to the USA amounted to more than the sum of all British industrial exports to the USa, and were thus of vital importance for Britain to obtain US dollars (hence their lack of enthusiasm to abandon it). As for administrative costs: all the British administration in India (and the cost of the Indian Army too) were paid by the Indian taxpayers, included the (very generous) pensions that retired functionaries and (white) officers were entitled to receive once they retired back to Britain. And if that wasn't enough, before 1914 the sterling adopted the gold standard while the Indian rupee was kept on the silver standard, while silver devaluated steadily with respect to gold, but said payments in the form of salaries and pensions to British particulars and companies had to be liquidated in pounds sterling, with the result that the drain of money from India increased steadily while the size of the British administration (or the number of British officers in its army) did not increase at the same rate.
A map from 1864, showing graphically the amount of coal that the Uk exported back then to the rest of the world:
