I will also give an example. Suppose you have some critical info on your SD card. If you delete that info, you can't rest assured that your critical info has been deleted. Because system just shows it has been deleted. Until something else fills up the same sectors /space on your card, it wont be permanently deleted. But now, if you fill up your whole SD card with, say, videos and songs, then your critical info is really gone. Though simpler solution to do this is to format the SD card.
Same applies for internal memory. You must flash a new rom and fill the data space fully with other apps. Do it without activating/logging in your gmail. Once it's done, you can reflash it with wiping everything from recovery and give/sell to someone as a fresh phone.