Minecraft wiki entry for Things_not_to_do, associated text: TNT also affects the nearby environment. If there are multiple blocks of it, the first explosion launches the others in random directions due to them being entities when primed. This means that even placing it a reasonable distance away may still mean your base is partially blown up.