Japan is one of the countries where people smoke literally everywhere. As for marijuana, it's highly illegal, it's one of the remnants of the colonial history there as everything apart from smoking and drinking is considered evil due to how China was devastated with opium.
Maybe 20 years ago, not so much today. There are a few places around town and a few indoor restaurants where public smoking is still permitted, but this is no longer true in most public spaces. Not on train platforms, not indoors in the vast majority of public spaces, it's just not that common and the number of smokers in Japan has significantly diminished over the last several decades.
There are 'smoking boxes' on some train platforms, but I rarely see those in use by more than a few people out of the several hundred who may be waiting. Marijuana is also 'highly' illegal but also not exactly hard to find for people who are 'hip' and it's also not aggressively enforced, much like speeding.
Also, Japan doesn't actually have a 'colonial history' having never been colonized by another nation.
I'm thinking you have just heard about Japan by rough description?