An alliance with the Turks would have been a rational decision for the Bulgarians in the summer of 1913. And such a decision could potentially lead to a more positive development of events. More positive in comparison with the actual result of events. Moreover, everyone can get a more positive result.
Suggested thread:
By June 1914 Bulgaria had acute problems with all its neighbors: Serbia, Greece, Romania and Turkey. In such circumstances, an alliance with the Turks would reduce the number of Bulgaria's opponents, and also give a strong ally against the remaining opponents. Such a decision within the framework of Real Politics would be a strong move. But the Turks, of course, will set their own union condition: the Bulgarians must cede the territories in Thrace occupied by the Bulgarian army in the 1st Balkan War. The Bulgarian leadership will not like this condition. And in general, the Bulgarians were going to cope with all the problems on their own.
On June 29, the Bulgarian army attacked Serbian and Greek positions in Macedonia. The attack immediately failed, the Serbian and Greek armies went on their offensive. The Bulgarians were unable to stop their offensive. Romania began to mobilize with the clear intention of getting into the war as another enemy of Bulgaria. The Turkish army was already concentrated, ready to attack the Bulgarians.
A catastrophe was brewing for Bulgaria. Perhaps the only possible way to avoid a catastrophe is to quickly conclude an alliance with the Turks. Of course, it was a pity to give Thrace to the Turks. But the situation posed a choice: to lose Macedonia or Thrace? (Bulgaria has really lost both Macedonia and Thrace). Bulgarians will choose Macedonia for themselves. Macedonia has been Bulgarian since the very beginning of Bulgaria, here were the centers of the ancient Bulgarian state.
In reality, the Bulgarian leadership hoped for Russia. But then Russia decided that it was in its interest not to risk anything for the sake of Bulgarians. Moreover, the Bulgarians started the war despite a direct warning from Russia. And if the war turned into complications for the Bulgarians, then Russia did not want to take responsibility for it. Russian diplomacy brought this position to the Bulgarians – but they simply did not perceive anything. And when the Romanians and Turks came out against Bulgaria, it came as a surprise to the Bulgarians. The Russian leadership verbally condemned Romania and Turkey, but did not take any action, because the actions could bring complications to Russia itself.
Another part of the Bulgarian leadership hoped for Austria-Hungary. Perhaps the Austro-Hungarians really wanted to help the Bulgarians. But in fact A-X did nothing. A-X also decided that it was not really worth risking for the Bulgarians.
That is, the Bulgarian leadership had to really assess the situation. Really evaluate, and not follow the illusions that someone will stand up for them. But this is just the most difficult thing: to make a decision not out of illusions, but from a sober analysis of the situation. Here is the most dubious place of the proposed thread of events.
But still, let's assume that the Bulgarian leadership realized that it is impossible to rely on the great powers. And we need to get out of a catastrophic situation ourselves. And on July 3-4, the Bulgarians turned to the Ottoman Empire with a proposal for an alliance. Or (as suggested TS) the Ottomans themselves had previously proposed an alliance; at first the Bulgarians did not respond, but when they realized that a catastrophe was brewing for them, they agreed.