It's not nearly as crazy as it sounds. If you were accused of murder and your alibi was you were at a bar, then the court could force the bar to produce any video footage they had, any records of transactions etc. If it was claimed that I was at said bar on said night, I could be forced to appear in court and produce any diary entries I had, any photos on my phone from that night. These are reasonable requests.