You do not have to buy a ticket before applying for a visa if you are planning a vacation. As an alternative, you can show a flight schedule that you can reserve without needing to pay the full price of the ticket; you can purchase the actual ticket once you get your visa.