Why are you expecting it to redirect?
The form is submitting, but you aren’t doing anything with the response.
AJAX typically involves sending HTTP requests from client to server and processing the server’s response. This can take place without reloading the entire page (asynchronously).
Javascript receives the data response from the server and can then do something with it (normally update the DOM dynamically).
You can test all of this out if you create a PHP file called test.php and copy this into it.
<?php
$arr = array("message" => "The server says hello!");
echo json_encode($arr);
?>