Actually sort of two sides to this coin -
For virtually any prospective true student-athlete the best advice is often - find a school where you will be comfortable - socially , academically, geographically - so much so that - even if you wake up one day and find that, for one reason or another, you are no longer participating in your chosen sport - you still are happy with your choice. So, yes there needs to be a 'commitment' to the school.
However, the student-athlete is well advised to also make sure that they have a comfort level with the coach - and that the coach's strategy and philosophy and temperament is a match with their skill set and approach to their sport. So, as long as your sport of choice is going to be a large part of your college life, the match with the coach is critical.