Because of the same lack of cooperation with public authorities, and privacy features, that was the reason why telegram was blocked in countries like Cuba, Pakistan, China and Thailand. Now, Spain had join, although it was a temporary ban that happened in March this year.
I don't think what the Spain court is asking from telegram, will be easily released(the provision of information about the users uploading copyright content). If telegram should have that release, people would lose their trust towards them via the privacy of their chats