Subarray problem [Maximum Sum]

Hello everyone, I’m not able to understand the solution of this problem - https://codeforces.com/contest/1197/problem/D. Why do we need to consider subarrays of length m? https://codeforces.com/blog/entry/68553?#comment-529352