So I would love one day to be able to be a professor in say stats/CS department.
I don’t think you can really plan for this, other than by acquiring the skills and reputation that would make you an attractive hire for people in both disciplines. If the time comes and you see a position of this sort listed, go ahead and apply of course, but this is quite a rare event. Alternatively, once you secure a position in one department (already a hard enough thing to do in most people’s estimation), you can bring up the possibility of a joint appointment, either when you are offered the position or at any future time after you are hired, and see if the people involved are open to that idea. If you are very sought after and have multiple job offers on the table, that will give you useful negotiating leverage and increase your chances, but still be prepared for the answer to be “no”, or “not right now” - university politics is such that joint hires are not easy to arrange, and not always favored by all parties who need to sign off on them.
Finally, keep in mind that even if you can make it happen, it’s not necessarily the dream job you are thinking it is. As a joint member of two departments you will be paying a rather large (in my observation) “tax” of doing lots of things twice - getting to know and be on friendly terms with two large sets of colleagues; going to faculty meeting of two departments; being evaluated for promotion by two groups of people, each of which speaks a unique scientific dialect you’ll need to speak to convince them the work you are doing is good (and who will often look down on, or misunderstand, anything that you’re working on having to do with the other discipline); having two offices in two buildings that are halfway across campus from each other and needing to keep track of which one of them you left that textbook in that you really need right now; etc. - generally speaking there are a good number of inefficiencies of this sort. I’m not saying it has to be bad, and I’m sure there can be nice things about it, just be aware of these and other complications that you may not be taking into account. Good luck!