-는데 sets up a contrast and 까먹다 delivers the loss, so the speaker is admitting they had something and let it go: [마사지] 이름을 아는데 까먹었어, 물어보려고 했는데 까먹었네요, 어제 약속이 있었는데 까먹었어. What gets lost is usually an intention, a name, or an appointment — something the speaker feels a bit sheepish about. Every line here is casual spoken Korean, often said mid-sentence as the memory fails.