As Captain Amazing notes, this is not quite true. The earliest sultans in particular were generally, though not exclusively, born from married unions ( usually exogamous - the sultan Bayezid I was at least 3/4 Greek ). Ottoman marriage custom evolved a bit over time.
The Ottomans didn’t want an indisputable claim to inheritance. It rather went against ancient tribal custom and was as dangerous to a current ruler as it was to his infighting sons. To quote Daniel Goffman speaking about the situation in the early state from The Ottoman Empire and Early Modern Europe ( 2002, Cambridge University Press ):
The fact that Bayezid was a younger son and that both he and Yakub led armies suggests a vital distinction between the Ottoman and other European monarchies: in the Ottoman case, no favorite legally existed until the succession actually occurred. In other words, all sons were groomed for the throne; all sons were expected to be capable to assume it even though only one would do so. The Ottoman choice to retain this particular element from their central Asian past while throwing off so many others was another example of genius ( or luck ), for by doing so the dynasty considerably improved its chances for an extended line of competent rulers.
For the sultan’s heirs, the only thing that mattered is that they were sons of the sultan. The status, race and even religion of their mothers were technically irrelevant. This, again, was a holdover from central Asian tradition, when heirs were not infrequently born to mothers captured in raids. Very high mortality rates on the steppes meant that beggars couldn’t be choosy.
As for the preference for sons born to concubines, Goffman again:
The Ottomans did not adopt all of these domestic approaches simultaneously. Rather, their strategy evolved with their state. For example, the family contracted many marriages with rival dynasties in its early years; once it had become established, however, it preferred the security of partnering with slaves to the possibility that an infidel or heretical wife or mother might taint the monarch’s values and conduct ( just as much of England feared Charles I’s French Catholic wife was doing in the 1630’s and 1640’s ). It is in fact likely that Murad was the last ruler whose mother was not a concubine. The Ottomans did not do away with marriage, but seperated that institution from procreation. During the fifteenth and early sixteenth centuries not only did sultans always couple with concubines, but also an unwritten principle barred them from continuing sexual relations with the same woman once she had borne a son. This prohibition probably derived from the practical concern that the prince would become the focus of his mother’s life. The aim was realized in two ways: first, the lack of a dowry or political power outside the Ottoman context made the concubine completely dependent upon the imperial household; second, the severing of intimate ties with the sultan forced her to focus exclusively upon the abilities of her only son ( should he fail to win the throne, then she also would fail, and at best be condemned to isolated exile).