I think there should be at least some match between your interests and the professor's. Otherwise, they likely will not think it's worth their time (or yours) to hire you as an RA, and they'd be partly correct. This is the worst case--and likely the only--scenario, as I don't know how you would even get a response to an email if the interests you express are wildly different from the ones of your professor. There are some slight exceptions, e.g. if you're a quant person emailing a behavioral professor and say that you're looking for additional experience in data analysis or something and you know that that's the kind of additional assistance the professor is looking for.