Some apps need every byte in order, while others care more about speed than about a few lost packets. TCP gives reliable, ordered delivery with flow and congestion control; UDP just sends datagrams with almost no overhead. Pick TCP for web pages, file transfers and payments, and UDP for live video calls, online games and DNS lookups. Saying "UDP is unreliable so it is bad" is a trap; for real-time data a late packet is as useless as a lost one.