Why when we read a double parsha is the haftarah generally the haftarah of the second parsha?
According to many of the meforshim, the main reason is that we connect the haftara to the Torah portion that is read immediately before it (the maftir). Note that a days when we take out a second sefer torah for a special maftir, we read a special haftara as well. Thus, when a double parsha is read, we would read the haftara of the second parsha. As an example, we see in The Haftarah for a “Double Parsha” and
An interesting halacha that concerns us is which haftara is read when there is a double parsha. Generally speaking, the haftara of the second parsha is read, as that is the Torah reading that we just concluded.
For more on the topics of double Parshiyos and which and when they are combined, see recent article titled ‘Parsha Permutations’.
Although the AbuDraham (Seder Parshiyos V’Haftaros) cites two disparate minhagim with no actual ruling: one to read the first parsha’s haftara and ‘the Rambam’s minhag’ to read the second, nevertheless most other Rishonim, including the Sefer Minhagim (Minhag Shel Shabbos), Mordechai (end Maseches Megilla, 831; and not like the Ravyah citing the Ri HaLevi), Rambam (Seder HaTefillos Kol HaShana, end par. Hamaftir B’Navi; ‘v’zu haminhag b’rov hamekomos’), Haghos Maimoniyos (Hilchos Tefillah, Ch.13, 20), Shibolei HaLeket (80), and Tur (O.C. 428), rule to read the second parsha’s haftara. This is also codified as the proper psak by both the Shulchan Aruch (O.C. 284, 7) and Rema (O.C. 428, 8) and as far as this author knows this was accepted by all of Klal Yisrael [see, for example Chayei Adam (vol. 2, 118, 17), Kitzur Shulchan Aruch (79, 6), Aruch Hashulchan (O.C. 428, 7), Kaf Hachaim (ad loc. 51),and Yalkut Yosef (Kitzur Shulchan Aruch O.C. 484, 6)]. The main reason to do so is to read a haftara similar to what was just read, which translates to the second parsha just finished and not the first parsha.