URL encoding is necessary in HTTP requests because some characters have special meanings in the context of a URL, such as the ampersand and question mark. By encoding these characters using percent-encoding, they can be safely transmitted over the internet without interfering with the structure of the URL.