A factory spawned building materializes in the terrain. Afterwards you need to dig it out with a drill and, potentially, remove a block or two and replace them to eliminate flickering glitches. When a POI is spawned in by the game there are filler blocks that let designers fill in the terrain they don't want removed as part of the automated placement. While I've never seen a formal "we have designed it this way because..." sort of explanation, I imagine it's because a player could exploit placing structures to effortlessly dig out massive areas.
I set the ground of the planet to be indestructible. After the POI is generated, the underground part of the building cannot be entered. How to check POI which block is wrong?
You need to specify that you're making POIs and not just placing a player base. There are several things you need to do to make sure your POIs place correctly if they have underground layers meant to be dug out. You need to reset their pivot point, select flatten terrain and remove terrain, and use the correct offset.