Some attorney's will ask about totally irrelevant things just to annoy you or hoping to catch you off guard when they come back to the topic later. Or in some cases, they simply want to get you frustrated so that they get under your skin when they are asking their important questions. Depositions are just another part of discovery.
All the attorney has to do is catch you in one lie or to get you to make a misstatement that conflicts with some document they know they have and they will pound it into the ground in court. This is where the ammunition for the "were you lying then or are you lying now?" crap comes from.