Quotefriendship carries obligations, why wasn't he willing to extend the same principle to the polis?
I don't entirely agree with your comment, i think Epicurus did care about the polis to some extent, even if it carried obligations, Epicurus did say we should enter politics in emergencies for example. He's largely against aiming for political power, not against helping your neighbors, in fact the Epicureans care a great deal about helping their neighbors.
QuoteThe Epicureans are up in arms, and implore the assistance of their neighbors, and many are ready to fly to their aid. (Cicero, Tusculan Disputations, 3.21)
QuoteHe (The Wise Man) treats with much care as many people as he can, and he is thankful to those who treated him kindly. (Philodemus, On Choices and Avoidances, Column 22)
My guess, at least from my own reading, is that Epicurus rightly understood that a lot of these "honorable wars" were just stupidity about Honor, Fame, Power, and Status. They were dangerous, unstable, rarely went the way people think they do, and were a massive waste of time. Trying to be a "great man" via war or power is stupid and doesn't help.
Quoteas to achieving something that will appear great even to those who come after, it is nothing to do with the man who will not have perception or exist at all, and it comes about for very few men indeed, while the majority are killed like cattle in the battle lines. (Philodemus, On Death, Column 28)
And trying to achieve high office or join a military campaign was anxious and by in large hurt more than helped. But he would undertake duty in order to help the polis by either politics or military service if really needed.
Friendship by comparison is always pleasant if a true friendship, and is always painful to live without, this is why we would sometimes die for a friend, but only for a polis if we really need to for security.