Samos allies with Persia - 523 B.C.
We are not sure why Polycrates ultimately allied Samos with Persia, but we can hazzard a guess. Cambyses the Persian king had desires to take Egypt, for this he would need a fleet to help bring reinforcements and provisions along the dangerours road there.
Polycrates who had just recently expanded his territory was probably in need of money to help keep rebellious forces in check. Cambyses may have bribed him or the threat of the Persian empire on Samos who was in very close proximity would have been enough of a threat too for them to allie together or even Polycrates may have thought it time to get on friendly terms with Persia who might one day need to be called upon to help curb any rebellion.
Not long after this mutual understanding, Amasis the Pharaoh of Egypt broke off his friendship with Polycrates. Herodotus gives a detailed explaination of the breakdown (H3:40~43). But this might just be a wild story of the underlying feeling that Samos was now allies with Persia and Persia had every intention of invading Egypt.
Polycrates was not really a Persian friend and did his best to get the the best deal out of the situation. He sent Cambyses a fleet of 40 ships to help with the expedition into Egypt. But he sent Cambyses a letter asking him to use the fleet but to make sure that they were destroyed as he didn't want them to return to Samos. The reason for this was, that Polycrates sent Cambysis the rebellious elements out of his forces, and with them gone, his power would remain unapposed.
The fleet set sailed but did not aid the Persians; either on their way to meet Cambysis or after they had arrived gathering from spys what was to happen to them, rebelled against Polycrates and set sail for Samos to overthrow the tyrant. It may have also effected them that the true intentions of the force was know well known. The fact that their purpose was to help invade Egypt, a country that for a long time had been their friend and had dedicated many ornoments into their holy shrines at Samos, might have also added to the constenation.