I'm not sure. One thing I can say from experience though is that bills in Japan are newer and cleaner than they are in the US. My impression is that it would be unthinkable in Japan to write on a bill with a pen or to crumple it up. Also, I'd guess bills that start to get worn are taken out of circulation much earlier.
Compare that to the US where I've seen a supermarket teller draw a line with a pen across a bill after accepting it (why?) or people pulling wadded cash balls out of their pockets to pay for a soda at a convenience store.
I don't know what accounts for the difference but I did like the typically crisp and new bills in Japan.
To answer your question, it was likely a counterfeit detecting pen[0] that only leaves a visible mark on counterfeit notes. I generally only see them used on $100 bills; rarely on anything smaller.
There are machines at banks used mainly to swap old bills for new ones (新札). It's considered not-so-good form to pay for something with beat up bills, so they get a lot of use.
In canada you can have five coins in your pocket and still have $10 for lunch, but what strikes me weird is visiting americans' homes and seeing crumpled $1 bills stuck in the couch!
Where I live the smallest bill is $5 and is worth picking up, but to the Americans I know it almost seems like all change and $1 bills are worthless. Very foreign!
I don't treat US change as worthless (except maybe pennies) but I mostly toss it in a bucket at home and very occasionally feed it into a machine at the local grocery store that converts it to an Amazon gift certificate or whatever. $1 bills fit into my wallet just fine so nothing wrong with them although I don't use cash much day-to-day.
I also use the machines to convert coins into Amazon cards. When I get paid I pull out 600 so I have about 20 a day for food and entertainment money. My spare quarters go to laundry. And the rest of the coins are pretty much shoe/boxers/socks money. I only use my debit card to pay Comcast and PGE.
Compare that to the US where I've seen a supermarket teller draw a line with a pen across a bill after accepting it (why?) or people pulling wadded cash balls out of their pockets to pay for a soda at a convenience store.
I don't know what accounts for the difference but I did like the typically crisp and new bills in Japan.