When asking a question, the search is based on matching words in the title only, since this is what the user has entered. For general search, the words are matched in content, tags, usernames, etc... since the text entered isn't specifically a question title. You could debate whether this is the appropriate behavior - easy to change in qa-ajax-asktitle.php if you think not. As for related questions, it uses a different form of ranking, based on commonalities between questions, including the category.