Why did Carnap want to develop a modal logic? Here I think we have to note the influence of Wittgenstein's Tractatus. In his philosophical autobiography Carnap writes:
For me personally, Wittgenstein was perhaps the philosopher who, besides Russell and Frege, had the greatest influence on my thinking. The most important insight I gained from his work was the conception that the truth of logical statements is based only on their logical structure and on the meaning of the terms. Logical statements are true under all conceivable circumstances; thus their truth is independent of the contingent facts of the world. On the other hand, it follows that these statements do not say anything about the world and thus have no factual content.(Carnap 1963, p. 25)
Wittgenstein's account of logical truth depended on the view that every (cognitively meaningful) sentence has truth conditions (Wittgenstein 1922, 4.024). Carnap certainly appears to have taken Wittgenstein's remark as endorsing the truth-conditional theory of meaning. (See, for instance, Carnap 1947, p. 9.) If all logical truths are tautologies, and all tautologies are contentless, then you do not need metaphysics to explain (logical) necessity.
The truth-conditional theory of meaning was crucial to the Vienna Circle. In particular, you need to be able to provide truth-conditions in advance of whether you judge a statement to be true or false. This is the point that Carnap seems to have felt Tarski and Quine never appreciated:
I discovered that in these questions, even though my thinking on semantics had originally started from Tarski's ideas, a clear discrepancy existed between my position and that of Tarski and Quine, who rejected the sharp distinction I wished to make between logical and factual truth.(Carnap, 1963, p. 36)
In his autobiography (Carnap 1963, p. 62) Carnap makes the link with modality explicit:
After defining semantical concepts like logical truth and related ones, I proposed to interpret the modalities as those properties of propositions which correspond to certain semantical properties of the sentences expressing the propositions. For example, a proposition is logically necessary if and only if a sentence expressing it is logically true.
On that basis, Carnap proposed a semantics for modal logic. Not all philosophers were sympathetic to this project. In Quine 1953b, W. V. Quine distinguishes three grades of what he calls ‘modal involvement’.