In short, Spain and Portugal were warmer refuges for Europeans during the Ice Age that ended about 9,000 years ago, then while Spain was exposed to Mediterranean cultures, Portugal wasn't. But that's only the big picture, there are parts of Portugal that also came under different influences.