I'm a first-year PhD student in Machine Learning, and I've often heard that some students end up having to be a TA because his/her advisor does not have a sufficient funding for them to have a research assistantship. Generally, how important is the availability of funding of a professor as a factor to determine one's advisor? I understand the most important factor is the relevance of the professor to one's research, but then there are multiple choices left, so I'd like to know the answer.
Pretty important, depending on the field.
In some fields (e.g. humanities), it is standard that professors will have little funding for RAs, while in others (e.g. computer science) it is expected that they can fund all of their students through RAs. It depends on the availability of funding for that field. So one important caveat is that you should compare the professor’s funding situation with the alternatives, namely other professors in the department.
Time you spend TAing is time you don’t spend on research, which is the main purpose of a PhD. A couple of semesters of TAing is good experience, but, if you are constantly TAing due to lack of funding, it could hold you back, relative to other students.
You should also wonder why this professor can’t get funding. It may be a sign of deeper issues. It might signal that the professor’s research is not going well, in which case being their student is a bad idea. In particular, they might be denied tenure (i.e. fired) and their students will be left advisorless.