Some people I know (quite regular travelers) want to sit as far to the front as possible (of the section they are in), preferring even middle in the very front rows to aisle/window a few rows back. This could explain the seats including middles filling up in front when there is space. I try to avoid this by booking exit row if I can or something 5-10 rows back from the front of a aircraft cabin section.
It seems some automated systems fill the plane from the front / middle / back with full rows, maybe to balance the aircraft or after equipment change? For me, experflyer [just a happy customer] aircarft change alerts are great, I can try to change the seat to a better one.
I call an empty seat in Y next to me "the poor man's business class", it really makes it much more comfortable to travel, so try to optimize for that if possible. These days it is hard to decide exit row, more leg space but more likely to be a full row, compared to bigger chance of empty middle in 3+3 layout a few rows back...