I don't think I would ever do that in a production environment. Maybe on my personal laptop.
It's just not great from a security and trust point of view.
It's also important to remember that bit-squatting is a thing, and just because you think you're making a request to github.com doesn't mean you are, a bit might flip from gamma rays or heat and you end up requesting a shell script from jithub that can now straight own your machine.
Use an `http` url or ignore cert warnings? the great firewall of china or someone who's owned the cafe you are sitting in can own your machine.
It also sidesteps the hygiene of checksumming the resources you download to ensure that the thing you downloaded is what you expected to download.
copy pasting things from the web and putting them on your terminal is also considered insecure: https://www.wizer-training.com/blog/copy-paste
That's also ignoring that you can curl the wrong url and then pass a whole lot of crap to sh.
Here's a HN post on the topic that doesn't necessarily agree with me: https://news.ycombinator.com/item?id=12766049