URL encoding and HTML entity encoding both escape special characters, but for entirely different contexts. URL encoding (percent-encoding) makes characters safe inside a URL, turning a space into %20. HTML entity encoding makes characters safe inside HTML, turning a < into < so the browser doesn't treat it as a tag.
Swapping them causes broken pages or security holes. Percent-encoding a value you're inserting into HTML won't stop it being interpreted as markup; HTML-encoding a URL value breaks the link. Each scheme protects a specific parsing context.
