Never heard of or experienced this in Japan. My first thought is they weren’t actually security. Did they ask in Japanese or English? Even stranger is you said you didn’t even have a laptop.
Discussion
Def were security and asked me in English.
Can’t find anything definite, but apparently New Zealand has a law that requires you to submit passwords or pins or receive a fine. Seems to be unique in the fine aspect, but perhaps other countries would just refuse entry?? What is strange is that it was domestic travel.