Grammar question

In the sentence
コーヒーを飲みますが、紅茶は飲みません。
Why isコーヒー marked withをbut、紅茶is marked with は? Aren't both direct objects?

by WolfOfYoitsu