Because, electrolysis is a method, used for separating elements in a solution.
Such as, separating salt-water solution. In this proccess atoms exchange electrons, (redox reactions). And thats the reason electrolysis is a chemical change. Because atoms come together or separate to make new chemical compounds. I hope its understandable and helpful