Removing elements from a list while iterating through it (at least the way you are doing it) can be tricky.
Let's go through it step-by-step:
xxx = ['cc','bb','aa','qq','zz']
for k in xxx:
You're going to go through each element in the list. The first element is 'cc', which doesn't start with an 'a' so it is removed. Now 'bb' is the first element and 'aa' is the second. In other words:
xxx = ['bb','aa','qq','zz']
BUT the for loop, which only knows it has looked at one element, just moves on to the second element without realizing things have shifted! The second element is now 'aa', which is left alone. Then the loop moves to the third element, 'qq', and removes it, leaving:
xxx = ['bb','aa','zz']
The for loop sees a list with three elements and knows it has looked at three elements and believes it is done, even though it skipped 'bb' and 'zz' completely.
As others have suggested, you can use a list comprehension instead, though you should definitely google and read up on how they work before applying them.
[i for i in ['cc','bb','aa','qq','zz'] if i[0] == 'a']
In the future, I recommend putting print statements inside the for loop while debugging, just to see what's going on. For example, you probably would have figured this out on your own if you had:
for k in xxx:
print k
if k[0] != 'a':
xxx.remove(k)