can't I just leave the eggs in the incubator the whole time? Do I have to take them out after the 18 to 27th day?
You can leave them in the incubator the whole time. I do. I’d venture to say that most people on this forum don’t have a separate incubator to use as a hatcher.
Some people use a separate incubator as a hatcher for their own reasons. There is nothing wrong with that, but it is not something you absolutely have to do. It can make clean-up easier or it can make it a whole lot easier to run several different batches of eggs with different hatch dates at the same time.
I see something in your post that raises a red flag, the 18 to 27 day comment. It sounds like you are not doing chickens, turkeys or ducks maybe? The 18 days is lockdown for chickens. If you are not hatching chickens, you probably need to use a different day for lockdown.