Star Trek's planets were seeded by an ancient humanoid race and that's why the races are humanoid and physically compatible.