Man, I saw that thing moving sideways right after liftoff and I thought it was a gonner! Huge congrats to SpaceX for landing with an offset engine like that on their first try!!!
In addition to the other replies, it is also standard for rockets to 'clear the pad' as soon as possible, to avoid damaging the ground support equipment as much as possible.
The amount of kick to the side is almost certainly due to the offset engine, but they would definitely design the flight path (with that in mind) to clear the pad as fast as reasonable as well.
Yep, pretty much every rocket is much much cheaper than the often one-off launch infrastructure.
From what i remeber some Soviet rockets had after a string of pad destroing failures any abort commands disablee for the first 30 seconds of flight - regardless of what happens, it must not hit the pad, or Barmin (the chief designer of most Soviet launch complexes) will be angry and you don't want that.
The single raptor engine is offset from the center on this test, so it had to do some pretty quick and somewhat dramatic adjustments to keep things upright.
The design of the full rocket doesn't have a single center engine. Instead, it has three engines at the center.
This test article uses the same layout for engines, but with one engine instead of three. So that one engine is offset from the center.
Their flight software is already capable of handling the multiple engine out-scenario and compensating for it, so there's no real reason for them to center the engine for the test article.
The 'thrust puck' the engine is mounted to is designed for multiple engines, none of which are in the centre.
They are only using one engine this test, but are testing the flight-design thrust puck (as opposed to some interim structure with a centre mount for the single engine).
It's designed for 3 sea level engines and 3 vacuum engines to be installed in a radially symmetric fashion... But they only installed 1 sea level engine on this prototype.
There's some center-of-gravity and shifting of things as you burn up fuel. Not an expert, so here's where the streamer talks a bit about it, including why the space shuttle did it too: https://youtu.be/NJR4gZBLMNw?t=1195
Same here. I was waiting to see if it would cross the point of no return and obliterate their ground facilities... again. Instead, looks to have been a nearly perfect test. Onward!
It did obliterate their launch stand, with the flame of the raptor cutting through a thick steel beam, and you can see walkways being tossed about at ~0:12, but they have parts for 3 of those already on the site.
The amount of kick to the side is almost certainly due to the offset engine, but they would definitely design the flight path (with that in mind) to clear the pad as fast as reasonable as well.