If you specifically mean Reddit accounts, generally they’ll write a program that looks at popular posts from the past, then reposts them. Particularly sophisticated ones will have networks of these bots, so they might have others that take the comments that were highly voted on those posts the first time they were made and then copy those, too.
Their goal is to build up karma on an account and make it look like it has a normal posting history so that they can sell it to spammers who want to be able to advertise without looking like that’s what they’re doing. They think they’re more likely to get you to buy what they’re selling if they look like a normal redditor giving a product recommendation than if they’re a clearly brand new account.
That’s why you should always report bot accounts reposting stuff if you see them. It’s a lot harder for them to sell those accounts to spammers if they get banned or suspended.
Latest Answers