By illegal, do you mean against Lemmy's rules or against legislation?
For the former, I think it's up to each communities rules. In general, bots should be marked as such so that users can chose to hide them if they wish. For the latter, apart from neighboring rights which allows news outlets in some countries to seek remuneration from links to articles, there's nothing illegal in sharing links on Lemmy.
As for existing bots copying posts from Reddit, there is lemmit.online but is has been broken since Reddit removed their RSS feeds.