Profs apply for research grants that, depending on the grant terms, can be used to pay your stipend. There is no guarantee that your prof can secure that funding or afford to allocate it to support you. As a result, it behooves you to apply to funding agencies to get studentships that fund you.
Another note is that it is also a prestige thing. Getting grants as a graduate student makes you way more competitive when applying for PDF/PhD positions.