There is no such law "requiring" engine replacement at a certain mileage. That is a urban myth propagated by importers and car owners who simply don't know or understand the situation in Japan. The high taxes (annually assessed), insurance premiums, gas costs, and especially the safety inspection/registration (occurs biennial) combine to keep turnover of vehicles high.
For example, the Safety inspection for your typical car (say Camry/Accord type) can typically cost $2,000....each time! New vehicles have a 3 year grace period before they are required to submit for the Safety Inspection. In other words, for a 10 year old car, you will have already paid over $8,000, in just Safety Inspection fees! Don't forget, gas over in Japan is also typically four times the cost of here in the U.S. Mileage is kept low on the vehicles as EVERYONE (unless your fabulously rich and patient) uses alternative transportation to get around. Most folks use the trains for local and medium distance traveling/commuting.
Far distances are taken by airplane and local transportation done by either bicycle or bus. In that society, your car tends to be a status symbol more than anything else. I hope this sheds a little more light for you!