The answer to 'how did centipede get in my house' is that centipedes can get into homes through small cracks and crevices, often in search of food and moisture. They are typically attracted to damp, dark areas like basements, bathrooms, and under appliances or furniture.
Centipedes are predators that feed on other insects, so they may have entered your home in search of prey like spiders, ants, or other small bugs. They can also be accidentally brought inside with firewood, boxes, or other items. Keeping your home clean, dry, and sealing any entry points can help prevent centipede infestations.