Especially on these forums, I've seen the growing trend of people foregoing emergency funds entirely or at least believing they are over-rated, but this thinking tends to be more prevalent among high net worth people, many who are already FIRE'd, and I think that makes sense.
But at significantly lower net worths, an invested emergency fund is highly volatile and can impact a person's ability to cover the expenses required by the emergency. This is why it's generally not recommended to invest your emergency fund. It will come down to personal risk, however. More people are comfortable investing that money when they already have loads of investments laying around, but your mileage may vary.
It is true that you can withdraw your contributions to a Roth IRA, but just don't forget that you can't necessarily put that money back. If I have contributed $15,000 in a Roth IRA from previous years and have not contributed any for this year, and suddenly I have some crazy $10,000 emergency, yes, I can withdraw that $10,000 penalty free. However, I can't just put $10,000 back into my Roth later - I'll only be able to put in the contribution limit for the year (currently $6,000), and maybe possibly some for the previous year (if it's before April). The rules here are kind of tricky, you'd have to research this. But I hope the point is clear.
That, in my opinion, is one of the dangers of using a Roth IRA as an emergency fund: you could potentially permanently decrease how much you have in there. Buuuuut, then money is really about living life, so you do what you gotta do. One could argue that the potential foregone growth of un-invested cash out-weighs the risk of this. Damn personal finance, too many options!
I put my EF in a money market account. It earns me a little bit. I feel more secure this way. My Roth IRA is the emergency fund for my emergency fund, ha.