the point is: not ms is using it, the user is using it.
Like a knife. You can sell a knife without any problem, its perfectly legal. But if the buyer then kills someone with it, its an illegal use.
Maybe here there is no legal use for the youtube app possible, but then its only illegal to use the app, not to build it.
And as long as a user without google account can use the app (because google does not block the api to unauthenticated users), the user is not bound by any google TOS, and can use the app as he likes.