The phrase for all intents and purposes originated in 1546, in an Act of British Parliament that gave King Henry VIII the power to interpret laws in any way he wished.

It's used to express that one thing is essentially the same as another; they may differ slightly, but as far as the sense in which they are used or interpreted, the two things function similarly.

These examples show how the phrase is like a qualified equal sign, referring to things that are alike enough to be used or thought of in the same way, even if they're not identical:

He was forty, out of baseball, and, for all intents and purposes, out of life. (Maniac Magee)

For all intents and purposes, the instruments onboard Dragonfly are not terribly dissimilar from those on NASA's Curiosity Mars rover. (Scientific American)

If you say intents and purposes out loud, it sounds pretty close to intensive purposes, which is one reason why this phrase is commonly confused. Expressions like this, based on mishearing certain words, are called "eggcorns," after the common misinterpretation and misspelling of the word acorn

But intent is a noun meaning "the desired result of an action," while intensive is an adjective meaning "strenuous or concentrated." So all intensive purposes would mean something like "only in situations of maximum exertion or focus" — which is not really what this expression conveys. You can spot this common eggcorn in the sentences below:

The smartphone, for all intensive purposes, is the PC now. (Inc)

"They're still law enforcement officers for all intensive purposes," says Capers. (Salon)

Is the first sentence suggesting that a PC functions as a smartphone only under extreme duress? Does the second sentence mean that the officers enforce the law only in the most strenuous situations? Nope. The context of these sentences makes it clear that these statements are broadly true, and the subjects should be understood as equivalent. Remember: intents and purposes are both nouns, and they have similar meanings. They both refer to something that you want to happen as a result of your words or deeds.