Certain races naturally like or dislike other races and certain government types like or dislike other government types. Usually it's a split between the more "relaxed" types and races versus the more "totalitarian" types and races (democracy + republic + utopian paradise v. despotism + hive mind + military dictatorship and most other races v. insectoids).
Empires will find pretty much any reason to dislike you, including instinctive dislikes (racial opinion modifiers), having desirable colonies or resources, much greater military strength, whether or not you have enslaved/are exterminating members of their dominant race, and your government type.
In their defense, knowing the general size and strength of their empire is shown for you on the diplomacy screen, too. It's safe to assume that an empire with 30+ colonies and 100,000 firepower is pretty strong.
More space ports need more transports though since each port needs to be stocked with resources. Expanding too much usually stretches your trade too thin.
Is there any way to make the private sector build more freighters?
Expanding your empire with colonies will spur the civilians towards building more ships. Additional mining stations may work as well. If the trade itself doesn't matter to you and you just need resources, smuggling missions are a good way to acquire resources, as long as you're fine with feeding any number of pirate factions cash.