When adding creating an email account with the iPhone's Mail app, there are some account presets you can choose if you are creating an account that includes a preset such as Exchange, MobileMe, Gmail, Yahoo, and AOL.
If you selected/used the Yahoo account preset when creating the account, the account was created as an IMAP account.