When the drive starts up, it does this in one known state. It energizes the windings with this state and the motor assumes the nearest position that corresponds to this state. So it may move up to half a step in an arbitrary direction when powered up. In fact you can strike "may". Usually you can hear the motor move as you turn on the drive. From there on, the driver just sequences around left or right and assumes the motor follows it. And as mentioned, the homing routine makes it possible to synchronize to the actual position of the machine.
There are tons of copies of "your circuit" already on the net. Go Google. What is your task is to sort out those that does not work. No diodes to kill the spikes from the motor is the most common. If you try that, make sure your transistors can be changed in a few seconds, and buy a lot of them.