As for why: you can answer to “why” with either “because” or “to” but you can only answer to “what for” with “to”. To ‘avoid’ confusion I prefer to use “why” when I want to get “because” and “what for” when I want to get “to”, e.g.
Why did you buy this car? Because I like it. What for did you buy this car? To drive to work
As for why: you can answer to “why” with either “because” or “to” but you can only answer to “what for” with “to”. To ‘avoid’ confusion I prefer to use “why” when I want to get “because” and “what for” when I want to get “to”, e.g. Why did you buy this car? Because I like it. What for did you buy this car? To drive to work