Some orthodox Jews think Hebrew should be used only for prayer and formal study of the Talmud (Jewish holy texts including the Torah). Using it day to day would be improper as they see Hebrew as a holy language so they use Yiddish instead.
Also for lots of them, their parents/grandparents spoke Yiddish in the home as their first language so they want to keep that cultural link.
A bit about Hebrew:
Hebrew died out as the spoken language of the Jewish people during the Babylonian exile. During the Second Temple and Rabbinic periods the language spoken by most Jews was Aramaic and many Jews, including the rabbis, didn't understand Hebrew. The Hebrew that was used during that era was distinct from Biblical Hebrew with differences in grammar and vocabulary. During the Middle Ages and until the 19th century Hebrew remained a written but not spoken language. Jews in all parts of the diaspora wrote Biblical commentaries, philosophy, and books of Jewish law in Hebrew. That way a scholar who lived in North Africa and spoke Arabic as his daily language could read something written by a scholar who lived in France and spoke French. It wasn't until the 19th century with the rise of Zionism that the idea of reviving Hebrew as a spoken language became a thing. As a consequence today's Modern Hebrew is very different from Biblical Hebrew. The language has shifted so much that in 2012 a translation of the Bible into Modern Hebrew was published.
A bit about Yiddish:
Yiddish is a language that is about 1000 years old. It is a combination of mostly Middle High German and Hebrew with a bit of Slavic and Latin. It is written with Hebrew characters. It was the dominant language spoken by Jews in Eastern Europe. During the 20th century Yiddish almost died as a spoken language as the majority of Yiddish speakers were killed in the Holocaust. Additionally Yiddish speaking immigrants rarely passed the language on to their children and grandchildren (a process that began before the Holocaust). The children of these immigrants might have grown up hearing Yiddish being spoken in the house but themselves would speak the language of whatever country they lived in, mostly English and Hebrew.
The real question is: Why do some Orthodox Jews who live in the US speak Yiddish instead of English and some Orthodox Jews who live in Israel speak Yiddish instead of Hebrew?
After the Holocaust there was a strong desire to rebuild in America/Israel the world that had been destroyed in Europe. For some communities this included Yiddish. This has the added bonus of making these communities very insular and shielded from the outside, modern world. It's hard for outside people and influences to infiltrate a community that speaks a different language and it is hard for people brought up in that community to leave if they don't speak the language of the general society. In addition, these communities tend to be very anti-Zionist and this way can stay away from what was one of the major Zionist projects.
First, it's important to note that things like being "the language of David" are not primary concerns in the Jewish religious community. Yes, customs and continuity are important, but there's no particular rigid adherence to anything Jewish biblical figures would've done.
Anyway, a hundred years ago, the vast majority of modern Yiddish-speakers' ancestors spoke Yiddish, or at least the ancestors of current Yiddish-speaking communities did. The question is not why they adopted Yiddish, the question is why they retained it. This question sort of presumes a communal choice of language coming from weighing its advantages, which isn't really how this sort of thing occurs.
As other comments say, the resumption in the use of Hebrew as an everyday language was associated with Zionism, which was a largely secular movement. Yiddish-speaking communities in Israel (which existed in small numbers before there were Hebrew-speaking communities) therefore had little ideological reason to switch languages, and some religious objection to using Hebrew outside religious purposes. With an insular enough community, and no reason to change, they simply kept using Hebrew.
In the US the same thing applies, but there's also no practical reason to use Hebrew in the US. Use of Yiddish is mostly a communal marker, and a symbol of resistance to assimilation. But most Orthodox Jews, even partially Yiddish-using ones, speak English too and live a substantial portion of their lives in English.\
Basically, use of Yiddish is a thing that many Jews (though not anywhere close to a majority of Orthodox Jews) think is an important enough tradition to keep doing. With relatively insular communities, and no particular desire to switch, Jewish communities have often historically used different language than their neighbors for long periods of time, if their use was considered prestigious. That's what happens with Yiddish in certain Orthodox communities, though not nearly to the extent of some other Jewish languages have in the past.