I don't know that it's outright illegal. But manipulating the price of a token for your own gain, at someone else's expense, is illicit imo.
If I know how an oracle calculates a price for a pair, I can probably alter the oracle's value for it (with a lot of volume from your flash loan), without affecting other exchanges value for it. This lets you create arb opportunities for yourself: https://www.trustnodes.com/2020/02/15/hacker-makes-360000-et...