"I'll do this by 11" means that you will finish something at 11 or before 11 the proposition By is mainly used to refer to a deadline, So its used to indicate time.
You can't use To because to is used to indicate place or person.
Example: I have to submit my assignment by 11.
I have to sumbit my assignmet to my professor.