Same company

They may have “different legal entities” but it’s the same.

https://en.wikipedia.org/wiki/Yamaha_Corporation

Yeah, that's one of them. Here's the other:

https://en.wikipedia.org/wiki/Yamaha_Motor_Company

It even says in your link "The former motorcycle division was established in 1955 as Yamaha Motor Co., Ltd., which started as an affiliated company but has been spun-off as its own independent company. "