Why not use the channel capacity as the sliding window size?
Sliding windows are used to:


Keep track which packets were sent and received, hence the data transmission is reliable
Keep track of the memory available to the receiver. The receiver may fill its buffers and tell to the sender to slow down (because more packets will simply be dropped, causing the sender to re-send them with a probably bigger delay)


When multiple data streams pass through the same link you wont be able to use 100% of the capacity anyway, and probably more packets will be lost. In this situation sending more data simply means having to re-send the data later. That's why you want to avoid congestion and throttle the speed.

In summary: it is not true that sending data at the possible speed you can will result in the data being correctly transferred in a smaller time. It often simply means that you have to resend the same packets over again because they continue to get lost/dropped by congestioned routers/dropped by congestioned receiver. Sliding window are a way to control this and provide better overall performance.

Note: if you do not want a reliable transmission then sending at the maximum speed is better. However the amount of data that arrives correctly at the receiver may get quite small compared to what was sent.