Venice and the Mamelukes were both opposed to Ottoman expansion. I'm not sure why you would presume that the Venetians would ally with the Ottomans, with whom they fought multiple wars, as opposed to the Mamelukes.
They also worked together on multiple occasions. Venice and the Turks had an exceedingly complicated relationship.