It's because you didn't control the sector. From the logs it looks like he built two planets in the sector with your planet. Then he filled them and based them. That gave him control of the sector. Any player can attack any planet or any other player bounty free if they own the sector.
This is from the FAQ for the game.
Quote:
Sector Ownership and Bounties
Owning a sector is critical if you want to protect yourself from smaller players. If you would like to be able to attack small players planets or ships you need to own more than half of the based planets a sector can support.
Sector supports 5 planets you must own 3
Sector supports 4 planets you must own 3
Sector supports 3 planets you must own 2
Sector supports 2 planets you must own 2
Sector supports 1 planet you must own 1
Remember the planets you own must be based. If you own the number of based planets needed for the sector then you can attack any player who is in that sector and never get a bounty. As long as you own it then it is a bounty free area and any planet or player in the sector is fair game to attack.
I highlighted the part that details this. Everyone should read the
FAQ before playing the game. It may be a little out of date on some things but on most it is accurate. The link is on the login page on every game.
If you are just starting out you should find a sector that only supports one planet to prevent this from happening. If you have to or want to build in a sector that supports more than one planet you should fill it up with planets using Genesis Torpedoes if planets don't exist. Capture all of the planets. You don't even have to base them. Just capturing them will prevent a high ranked player from attacking you without a bounty. Though you should base and upgrade them to prevent a low ranked player from taking them.
But your bets bet for your first planet it to build it in a sector that can only support one planet.