A man who allegedly racially abused a schoolgirl on a Sydney bus has gone on a tirade in court.