I guess not illegal, but super shady.
Pretty easy to see how incremental thinking leads to a shady result. We get paid $X per order from our restaurant clients, they like more orders so if we can get them more, they’ll be happier and pay us more -> improve SEO of Grubhub<dot>com -> works -> what else can we do -> use our seo skills -> register other websites do seo -> more orders.
Bad result, but know how they got there.