Berlin rose as a songwriter in Tin Pan Alley on Broadway. In 1911, Emma Carus introduced his first world-famous hit, “Alexander’s Ragtime Band”, followed by a performance from Berlin himself at the Friars’ Frolic of 1911.1https://www.google.com/books/edition/The_Complete_Lyrics_of_Irving_Berlin/ArxJGmmIQR8C?hl=en&gbpv=1&bsq=israel%20beilin He became an instant celebrity, and was a featured performer later that year at Oscar Hammerstein’s vaudeville house, where he introduced dozens of other songs.
Berlin was “flabbergasted” by the sudden international popularity of Alexander’s Ragtime Band, and wondered why it became such a sudden hit. He decided it was partly because the lyrics, “silly though it was, was fundamentally right…[and] the melody…started the heels and shoulders of all America and a good section of Europe Rocking.”2https://www.google.com/books/edition/As_Thousands_Cheer/8ZgJu3UKRfIC?hl=en&gbpv=1&dq=as+thousands+cheer&printsec=frontcover
On April 1st, 1917, after President Woodrow Wilson declared that America would enter WWI, Berlin felt that Tin Pan Alley should do its duty and support the war with inspirational songs. Berlin wrote the song, “For Your Country and My Country”, stating that “we must speak with the sword not the pen to show our appreciation to America for opening up her heart and welcoming every immigrant group.” He also co-wrote a song aimed at ending ethnic conflict, “Let’s All be Americans Now.”3Irving Berlin and Ragtime America.
Treasury Secretary Henry Morgenthau requested a song to inspire Americans to buy war bonds during World War II, Berlin wrote “Any Bonds Today?” and assigned all royalties to the United States Treasury Department. He then wrote various songs for government agencies and likewise reassigned all profits to them:
American Red Cross – “Angels of Mercy”
Army Ordinance Department – “Arms for the Love of America”
Treasury – “I Paid My Income Tax Today”4https://web.archive.org/web/20130617121733/http://hnn.us/blogs/entries/57008.html