A person gets a lot of hormones which makes them want to reproduce and it will be clearer to them what their sexuality is.
It affects you because while puberty is happening you really are not sure what to like.