Yes, it was partly about European colonial greed. “In Istanbul, the buying of books by foreigners eventually got so out of hand that in 1715 or 1716 the grand vizir, Şehid Ali Pasha, himself a book collector, ‘enacted a law … banning the sale of books to foreigners.’ This protectionist measure was designed to prevent the disappearance of valuable intellectual resources from the capital.”