The three dialects and the space
Inside a query value, encodeURIComponent-style encoding escapes &, =, / and everything else that could be misread, and a space becomes %20. On a whole URL, only what must be escaped is - the &, / and : that separate the URL are left alone or it stops working. In form data, a space becomes + and everything else follows the component rules.
Decoding reverses whichever dialect you say the text came from, which matters most for the +: a + decoded as component data stays a +, and a + decoded as form data becomes a space. The page’s default for form data turns the pluses back into spaces, because that is what form encoding did to them.