Is it unwise to contact the professor directly before getting admitted to a program in US?
Let me answer this question from the perspective of our school. If a school does things differently the answer you're quoting might be very appropriate, but not in our case.

Our admission decisions are made by our department, and essentially everyone is on the admissions committee - we share the load of evaluating applications. So, there could be great benefit of talking to a professor ahead of time. If one faculty member strongly desires a particular candidate, that student will generally get admitted, assuming they meet our qualifications. (Note that, as a small school, we have enough capacity to take more students than we do because we don't get tons of qualified applications. Also, we almost always have TA funding available for qualified students. But this really varies from one university to another.)

So, this establishes that, at some schools, talking to potential advisors ahead of time can be very valuable. The interest of working with a particular advisor can also (and should) go into the personal statement. I read so many personal statements that you can tell are completely generic, with different school names copy and pasted in. So, when someone says something specific about my research area, I take notice, and I think other faculty do too.

The real issue is that I get so many requests from random students to look at their CV. Many of them have very little connection to my work and are probably mass-emailing professors. This should be avoided.

@Anonymous' answer has the right idea here. A few months ago a student contacted me with a list of publications and a precise statement of interest about my work. We exchanged a few e-mails and I looked at his work. Another student tracked me down after a talk at a conference and talked to me in more detail about the work. These were both appropriate ways to contact me that may benefit the students in the future.