PDF stands for "Portable Document Format". It carries not just textual content, but also layout with it, making it generally suitable for reading on a screen as well as printing out on paper. Documents that used to require physical printing on paper (such as resumes, but also other things like homework assignments or corporate forms) have had a much easier transition to digital with the help of formats like PDF since that's what the format was designed for
The .docx format is generally also acceptable since it is commonly supported by Windows applications and also contains formatting and layout information in addition to text
Plaintext files not only lack formatting, but they also depend on the character set that's being used. If you type up your resume as a .txt file on a *NIX machine and your prospective employer opens it in Windows Notepad, they might see all of your words squashed together rather than typed out in a way that you intended
And even if your plaintext resume did open properly, scanning it would be a chore compared to your competition since there would be no visual cues like large headers, indentation (which can be affected by word wrap in plaintext), or hyperlinks (useful for linking to email addresses, phone numbers, online profiles, etc), to name a few things