In your "working" example 2 you're actively driving the pins high and low.
I2C is an open-drain/collector bus where the high level speed is determined in part by the pullup values.

To reduce the rise time, lower the values to 4.7K or thereabouts